diff --git a/sdk/js-query/CHANGELOG.md b/sdk/js-query/CHANGELOG.md index db91d575dc..88cbe8a737 100644 --- a/sdk/js-query/CHANGELOG.md +++ b/sdk/js-query/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.0.12 + +Fix SolanaPda mock for bad rentEpoch parsing + +## 0.0.11 + +Add Solana PDA support + ## 0.0.10 Fix SolanaAccount mock for bad rentEpoch parsing diff --git a/sdk/js-query/package-lock.json b/sdk/js-query/package-lock.json index a52d9dbc16..37a214a3ed 100644 --- a/sdk/js-query/package-lock.json +++ b/sdk/js-query/package-lock.json @@ -1,12 +1,12 @@ { "name": "@wormhole-foundation/wormhole-query-sdk", - "version": "0.0.11", + "version": "0.0.12", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@wormhole-foundation/wormhole-query-sdk", - "version": "0.0.11", + "version": "0.0.12", "license": "Apache-2.0", "dependencies": { "@ethersproject/keccak256": "^5.7.0", diff --git a/sdk/js-query/package.json b/sdk/js-query/package.json index b4b99b1891..a354a9784a 100644 --- a/sdk/js-query/package.json +++ b/sdk/js-query/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/wormhole-query-sdk", - "version": "0.0.11", + "version": "0.0.12", "description": "Wormhole cross-chain query SDK", "homepage": "https://wormhole.com", "main": "./lib/cjs/index.js", diff --git a/sdk/js-query/src/mock/index.ts b/sdk/js-query/src/mock/index.ts index 918a60698e..43274b0b7c 100644 --- a/sdk/js-query/src/mock/index.ts +++ b/sdk/js-query/src/mock/index.ts @@ -559,11 +559,18 @@ export class QueryProxyMock { let results: SolanaPdaResult[] = []; let idx = 0; response.data.result.value.forEach((val) => { + const rentEpoch = BigInt(val.rentEpoch); results.push({ account: Uint8Array.from(base58.decode(accounts[idx].toString())), bump: bumps[idx], lamports: BigInt(val.lamports), - rentEpoch: BigInt(val.rentEpoch), + rentEpoch: + // this is a band-aid for an axios / JSON.parse effect where numbers > Number.MAX_SAFE_INTEGER are not parsed correctly + // e.g. 18446744073709551615 becomes 18446744073709552000 + // https://github.com/axios/axios/issues/4846 + rentEpoch > SOLANA_MAX_RENT_EPOCH + ? SOLANA_MAX_RENT_EPOCH + : rentEpoch, executable: Boolean(val.executable), owner: Uint8Array.from(base58.decode(val.owner.toString())), data: Uint8Array.from(