From 703baceb19155a53923eb63b99fdb08e7bf7cce8 Mon Sep 17 00:00:00 2001 From: Harish <45291139+HarishPrasannaV@users.noreply.github.com> Date: Sat, 6 Jan 2024 17:36:29 +0530 Subject: [PATCH] Changed rentEpoch type in AccountHeader from number to BigInt (#105) --- .changeset/fluffy-carrots-cheat.md | 6 ++++++ packages/umi-rpc-web3js/src/createWeb3JsRpc.ts | 2 +- packages/umi/src/Account.ts | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/fluffy-carrots-cheat.md diff --git a/.changeset/fluffy-carrots-cheat.md b/.changeset/fluffy-carrots-cheat.md new file mode 100644 index 00000000..944e2f03 --- /dev/null +++ b/.changeset/fluffy-carrots-cheat.md @@ -0,0 +1,6 @@ +--- +"@metaplex-foundation/umi-rpc-web3js": minor +"@metaplex-foundation/umi": minor +--- + +Changed rentEpoch type in AccountHeader from number to BigInt diff --git a/packages/umi-rpc-web3js/src/createWeb3JsRpc.ts b/packages/umi-rpc-web3js/src/createWeb3JsRpc.ts index 118b6b1a..85e5d9c0 100644 --- a/packages/umi-rpc-web3js/src/createWeb3JsRpc.ts +++ b/packages/umi-rpc-web3js/src/createWeb3JsRpc.ts @@ -384,7 +384,7 @@ function parseAccount( executable: account.executable, owner: fromWeb3JsPublicKey(account.owner), lamports: lamports(account.lamports), - rentEpoch: account.rentEpoch, + rentEpoch: account.rentEpoch ? BigInt(account.rentEpoch) : undefined, publicKey, data: new Uint8Array(account.data), }; diff --git a/packages/umi/src/Account.ts b/packages/umi/src/Account.ts index 380025c9..0a545283 100644 --- a/packages/umi/src/Account.ts +++ b/packages/umi/src/Account.ts @@ -17,7 +17,7 @@ export type AccountHeader = { executable: boolean; owner: PublicKey; lamports: SolAmount; - rentEpoch?: number; + rentEpoch?: bigint; }; /**