From 9f821adcc622085ff043382bcf1182b61a468610 Mon Sep 17 00:00:00 2001 From: weatherstar Date: Wed, 15 Feb 2023 09:33:23 +0800 Subject: [PATCH] fix: batch transfer nft failed on sol (#2567) --- packages/engine/src/vaults/impl/sol/Vault.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/engine/src/vaults/impl/sol/Vault.ts b/packages/engine/src/vaults/impl/sol/Vault.ts index 7be4cfd4c28..6ac56e7c13d 100644 --- a/packages/engine/src/vaults/impl/sol/Vault.ts +++ b/packages/engine/src/vaults/impl/sol/Vault.ts @@ -475,7 +475,7 @@ export default class Vault extends VaultBase { ): Promise { const client = await this.getClient(); const transferInfo = transferInfos[0]; - const { from } = transferInfo; + const { from, to: firstReceiver, isNFT } = transferInfo; const feePayer = new PublicKey(from); const nativeTx = new Transaction(); @@ -484,7 +484,7 @@ export default class Vault extends VaultBase { for (let i = 0; i < transferInfos.length; i += 1) { const { token: tokenAddress, amount, to, sendAddress } = transferInfos[i]; - const receiver = new PublicKey(to); + const receiver = new PublicKey(to || firstReceiver); const token = await this.engine.ensureTokenInDB( this.networkId,