Skip to content

Commit

Permalink
fix: batch transfer nft failed on sol (#2567)
Browse files Browse the repository at this point in the history
  • Loading branch information
weatherstar authored Feb 15, 2023
1 parent e8cad35 commit 9f821ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/engine/src/vaults/impl/sol/Vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ export default class Vault extends VaultBase {
): Promise<IEncodedTx> {
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();
Expand All @@ -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,
Expand Down

0 comments on commit 9f821ad

Please sign in to comment.