Skip to content

Commit faa763c

Browse files
Merge pull request #9026 from BitGo/CHALO-624
fix(sdk-coin-sol): skip checking recipients in case of ATA tx
2 parents b3c6f5b + c54e674 commit faa763c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • modules/sdk-coin-sol/src

modules/sdk-coin-sol/src/sol.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,10 @@ export class Sol extends BaseCoin {
562562
}
563563
}
564564

565+
const isTokenEnablementTx = txParams.type === 'enabletoken';
565566
// users do not input recipients for consolidation requests as they are generated by the server
566567
// Close-ATA txs do not populate explainedTx.outputs; recipients carry ATA addresses for intent only.
567-
if (txParams.recipients !== undefined && !isCloseAssociatedTokenAccountTx) {
568+
if (txParams.recipients !== undefined && !isTokenEnablementTx && !isCloseAssociatedTokenAccountTx) {
568569
const filteredRecipients = txParams.recipients?.map((recipient) =>
569570
_.pick(recipient, ['address', 'amount', 'tokenName'])
570571
);
@@ -662,7 +663,7 @@ export class Sol extends BaseCoin {
662663
if (memo && memo.value !== explainedTx.memo) {
663664
throw new Error('Tx memo does not match with expected txParams recipient memo');
664665
}
665-
if (txParams.recipients && !isCloseAssociatedTokenAccountTx) {
666+
if (txParams.recipients && !isTokenEnablementTx && !isCloseAssociatedTokenAccountTx) {
666667
for (const recipients of txParams.recipients) {
667668
// totalAmount based on each token
668669
const assetName = recipients.tokenName || this.getChain();

0 commit comments

Comments
 (0)