@zebec-network/exchange-card-sdk 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,10 +108,7 @@ export declare class NearService {
108
108
  }): Promise<FinalExecutionOutcome>;
109
109
  getNearBalance(params: {
110
110
  signerId?: string;
111
- }): Promise<{
112
- block_height: import("@near-js/types").BlockHeight;
113
- block_hash: import("@near-js/types").BlockHash;
114
- }>;
111
+ }): Promise<string>;
115
112
  getTokenBalance(params: {
116
113
  tokenContractId: string;
117
114
  signerId?: string;
@@ -165,7 +165,10 @@ export class NearService {
165
165
  account_id: signerId,
166
166
  finality: "final",
167
167
  });
168
- return { ...result };
168
+ assert("amount" in result, "Amount field is missing in the account data.");
169
+ assert(typeof result.amount === "string", "Amount field is not a string.");
170
+ const nearDecimals = 24;
171
+ return BigNumber(result.amount).div(BigNumber(10).pow(nearDecimals)).toFixed();
169
172
  }
170
173
  async getTokenBalance(params) {
171
174
  const signerId = params.signerId ? params.signerId : this.wallet.signerId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zebec-network/exchange-card-sdk",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "An sdk for purchasing silver card in zebec",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,9 +18,9 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@algorandfoundation/algokit-utils": "^9.1.2",
21
- "@near-js/accounts": "^2.3.0",
22
- "@near-js/keystores": "^2.3.0",
23
- "@near-js/signers": "^2.3.0",
21
+ "@near-js/accounts": "^2.5.1",
22
+ "@near-js/keystores": "^2.5.1",
23
+ "@near-js/signers": "^2.5.1",
24
24
  "@typechain/ethers-v6": "^0.5.1",
25
25
  "@types/mocha": "^10.0.10",
26
26
  "@types/node": "^24.3.1",
@@ -34,11 +34,11 @@
34
34
  "typescript": "^5.9.2"
35
35
  },
36
36
  "dependencies": {
37
- "@near-js/crypto": "^2.3.0",
38
- "@near-js/providers": "^2.3.0",
39
- "@near-js/transactions": "^2.3.0",
40
- "@near-js/types": "^2.3.0",
41
- "@near-js/utils": "^2.3.0",
37
+ "@near-js/crypto": "^2.5.1",
38
+ "@near-js/providers": "^2.5.1",
39
+ "@near-js/transactions": "^2.5.1",
40
+ "@near-js/types": "^2.5.1",
41
+ "@near-js/utils": "^2.5.1",
42
42
  "@stellar/stellar-sdk": "^13.1.0",
43
43
  "algosdk": "^3.4.0",
44
44
  "axios": "^1.11.0",