Skip to content

Commit

Permalink
fixup! chore: Port @suite-common/wallet-core and `@suite-common/wal…
Browse files Browse the repository at this point in the history
…let-utils` to `@solana/web3.js` v2
  • Loading branch information
martykan committed Nov 26, 2024
1 parent e99f18b commit ff99aee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions suite-common/wallet-utils/src/__fixtures__/solanaUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export const fixtures = {
role: AccountRole.READONLY,
},
],
data: new Uint8Array([0]),
data: new Uint8Array([]),
},
},
],
Expand Down Expand Up @@ -196,7 +196,7 @@ export const fixtures = {
},
},
expectedOutput:
'01000609c80f8b50107e9f3e3c16a661b8c806df454a6deb293d5e8730a9d28f2f4998c6a99c9c4d0c7def9dd60a3a40dc5266faf41996310aa62ad6cbd9b64e1e2cca78ebaa24826cef9644c1ecf0dfcf955775b8438528e97820efc2b20ed46be1dc580000000000000000000000000000000000000000000000000000000000000000527706a12f3f7c3c852582f0f79b515c03c6ffbe6e3100044ba7c982eb5cf9f28c97258f4e2489f1bb3d1029148e0d830b5a1399daff1084048e7bd8dbe9f8590306466fe5211732ffecadba72c39be7bc8ce5bbc5f7126b2c439b3a40000000d27c181cb023db6239e22e49e4b67f7dd9ed13f3d7ed319f9e91b3bc64cec0a906ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a96772b7d36a2e66e52c817f385d7e94d3d4b6d47d7171c9f2dd86c6f1be1a93eb040600050250c3000006000903a086010000000000050600020704030801000804010402000a0c00e1f5050000000009',
'01000609c80f8b50107e9f3e3c16a661b8c806df454a6deb293d5e8730a9d28f2f4998c6a99c9c4d0c7def9dd60a3a40dc5266faf41996310aa62ad6cbd9b64e1e2cca78ebaa24826cef9644c1ecf0dfcf955775b8438528e97820efc2b20ed46be1dc580000000000000000000000000000000000000000000000000000000000000000527706a12f3f7c3c852582f0f79b515c03c6ffbe6e3100044ba7c982eb5cf9f28c97258f4e2489f1bb3d1029148e0d830b5a1399daff1084048e7bd8dbe9f8590306466fe5211732ffecadba72c39be7bc8ce5bbc5f7126b2c439b3a40000000d27c181cb023db6239e22e49e4b67f7dd9ed13f3d7ed319f9e91b3bc64cec0a906ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a96772b7d36a2e66e52c817f385d7e94d3d4b6d47d7171c9f2dd86c6f1be1a93eb040600050250c3000006000903a0860100000000000506000207040308000804010402000a0c00e1f5050000000009',
},
{
description:
Expand Down
2 changes: 2 additions & 0 deletions suite-common/wallet-utils/src/solanaUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ export const buildCreateAssociatedTokenAccountInstruction = async (
owner: address(newOwnerAddress),
payer: createNoopSigner(address(funderAddress)),
});
// @ts-expect-error - we are overriding this due to FW compatibility issue, it expects [] instead of [0]
txInstruction.data = new Uint8Array([]);

return [txInstruction, associatedTokenAccountAddress] as const;
};
Expand Down

0 comments on commit ff99aee

Please sign in to comment.