sdk/js: Use BN.toArrayLike in `tokenIdToMint` function for browserify compatibility.
This commit is contained in:
parent
280fffe486
commit
5f6782e67d
|
@ -1,5 +1,11 @@
|
|||
# Changelog
|
||||
|
||||
## 0.9.9
|
||||
|
||||
## Changed
|
||||
|
||||
Use BN.toArrayLike for compatibility with browserify and similar tools in `tokenIdToMint` function
|
||||
|
||||
## 0.9.8
|
||||
|
||||
## Changed
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@certusone/wormhole-sdk",
|
||||
"version": "0.9.8",
|
||||
"version": "0.9.9",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@certusone/wormhole-sdk",
|
||||
"version": "0.9.8",
|
||||
"version": "0.9.9",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@certusone/wormhole-sdk-proto-web": "0.0.6",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certusone/wormhole-sdk",
|
||||
"version": "0.9.8",
|
||||
"version": "0.9.9",
|
||||
"description": "SDK for interacting with Wormhole",
|
||||
"homepage": "https://wormhole.com",
|
||||
"main": "./lib/cjs/index.js",
|
||||
|
|
|
@ -35,7 +35,7 @@ export function coder(): NftBridgeCoder {
|
|||
}
|
||||
|
||||
export function tokenIdToMint(tokenId: bigint) {
|
||||
return new PublicKey(new BN(tokenId.toString()).toBuffer());
|
||||
return new PublicKey(new BN(tokenId.toString()).toArrayLike(Buffer));
|
||||
}
|
||||
|
||||
export function mintToTokenId(mint: PublicKeyInitData) {
|
||||
|
|
Loading…
Reference in New Issue