@cryptorubic/web3 1.1.0-alpha-stellar.8 → 1.1.0-alpha-stellar.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptorubic/web3",
3
- "version": "1.1.0-alpha-stellar.8",
3
+ "version": "1.1.0-alpha-stellar.9",
4
4
  "dependencies": {
5
5
  "@ethersproject/bignumber": "^5.8.0",
6
6
  "@mysten/sui": "^1.24.0",
@@ -35,7 +35,11 @@ class StellarAdapter extends abstract_adapter_1.AbstractAdapter {
35
35
  try {
36
36
  const resp = await this.public.simulateTransaction(tx);
37
37
  //@ts-ignore
38
- const rawRetval = resp.results.retval;
38
+ if (resp.error) {
39
+ return new bignumber_js_1.default(0);
40
+ }
41
+ //@ts-ignore
42
+ const rawRetval = resp.result.retval;
39
43
  const balance = (0, stellar_sdk_1.scValToBigInt)(rawRetval);
40
44
  return new bignumber_js_1.default(balance.toString());
41
45
  }