sdk/js: Fixed algo address conversion

This commit is contained in:
Paul Noel 2022-05-31 17:57:41 +00:00 committed by Evan Gray
parent 38d8918d28
commit 90beeac4e6
3 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## 0.3.6
### Changed
Fixed Algorand for addresses for non native assets
## 0.3.5
### Changed

View File

@ -1,6 +1,6 @@
{
"name": "@certusone/wormhole-sdk",
"version": "0.3.5",
"version": "0.3.6",
"description": "SDK for interacting with Wormhole",
"homepage": "https://wormholenetwork.com",
"main": "./lib/cjs/index.js",

View File

@ -173,7 +173,7 @@ export async function getOriginalAssetAlgorand(
assetId
);
if (!retVal.isWrapped) {
retVal.assetAddress = zeroPad(hexToUint8Array(assetId.toString(16)), 32);
retVal.assetAddress = zeroPad(arrayify(ethers.BigNumber.from(assetId)), 32);
return retVal;
}
const assetInfo = await client.getAssetByID(safeBigIntToNumber(assetId)).do();