Skip to content

Commit

Permalink
fix: always set memo for SIP10, ref #5436
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed May 24, 2024
1 parent d910b9a commit 64f20f8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/app/store/transactions/token-transfer.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ export function useGenerateFtTokenTransferUnsignedTx(info: Sip10CryptoAssetInfo)
const { contractId } = info;
const { contractAddress, contractAssetName, contractName } =
getStacksContractIdStringParts(contractId);

return useCallback(
async (values?: StacksSendFormValues | StacksTransactionFormValues) => {
try {
debugger;
if (!account) return;

const functionName = 'transfer';
Expand Down Expand Up @@ -122,9 +120,7 @@ export function useGenerateFtTokenTransferUnsignedTx(info: Sip10CryptoAssetInfo)
standardPrincipalCVFromAddress(recipient),
];

if (info.hasMemo) {
functionArgs.push(memo);
}
functionArgs.push(memo);

const options = {
txData: {
Expand All @@ -145,15 +141,13 @@ export function useGenerateFtTokenTransferUnsignedTx(info: Sip10CryptoAssetInfo)

return generateUnsignedTransaction(options);
} catch (error) {
debugger;
logger.error('Failed to generate unsigned transaction', error);
return;
}
},
[
account,
info.decimals,
info.hasMemo,
network,
nextNonce?.nonce,
contractName,
Expand Down

0 comments on commit 64f20f8

Please sign in to comment.