Skip to content

Commit 0f3d7d6

Browse files
authored
Merge pull request #6319 from BitGo/COIN-4580
fix(sdk-coin-near): bug fix in ft builder of near
2 parents 166bdbf + 97787e9 commit 0f3d7d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/sdk-coin-near/src/lib/fungibleTokenTransferBuilder.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ export class FungibleTokenTransferBuilder extends TransactionBuilder {
124124
assert(gas, new BuildTransactionError('gas is required before building fungible token transfer'));
125125
assert(deposit, new BuildTransactionError('deposit is required before building fungible token transfer'));
126126

127-
if (!this._actions || this._actions.length === 0 || this._actions[0].functionCall?.methodName !== methodName) {
127+
if (
128+
!this._actions ||
129+
this._actions.length === 0 ||
130+
(this._actions.length === 1 && this._actions[0].functionCall?.methodName !== methodName)
131+
) {
128132
super.action(NearAPI.transactions.functionCall(methodName, args, BigInt(gas), BigInt(deposit)));
129133
}
130134
const tx = await super.buildImplementation();

0 commit comments

Comments
 (0)