@cityofzion/bs-neox 1.3.1 → 1.3.2

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.
@@ -458,9 +458,7 @@ _BlockscoutBDSNeoX_nftDataService = new WeakMap(), _BlockscoutBDSNeoX_explorerSe
458
458
  const token = __classPrivateFieldGet(this, _BlockscoutBDSNeoX_neo3NeoXBridgeService, "f").tokens.find(this._tokenService.predicateByHash(BSNeoXConstants_1.BSNeoXConstants.NATIVE_ASSET));
459
459
  if (!token)
460
460
  return undefined;
461
- const amount = blockchain_service_1.BSBigNumberHelper.format(ethers_1.ethers.utils.formatUnits(blockscoutTransaction.value, token.decimals), {
462
- decimals: token.decimals,
463
- });
461
+ const amount = blockchain_service_1.BSBigNumberHelper.format(blockchain_service_1.BSBigNumberHelper.fromNumber(ethers_1.ethers.utils.formatUnits(blockscoutTransaction.value, token.decimals)).minus(Neo3NeoXBridgeService_1.Neo3NeoXBridgeService.BRIDGE_FEE), { decimals: token.decimals });
464
462
  return { amount, token, receiverAddress };
465
463
  }
466
464
  if (input.name === 'withdrawToken') {
@@ -3,6 +3,7 @@ import { BSNeoX } from '../../BSNeoX';
3
3
  export declare class Neo3NeoXBridgeService<BSName extends string> implements INeo3NeoXBridgeService<BSName> {
4
4
  #private;
5
5
  static readonly BRIDGE_SCRIPT_HASH = "0x1212000000000000000000000000000000000004";
6
+ static readonly BRIDGE_FEE = 0.1;
6
7
  readonly BRIDGE_BASE_CONFIRMATION_URL = "https://xexplorer.neo.org:8877/api/v1/transactions/deposits";
7
8
  tokens: TBridgeToken<BSName>[];
8
9
  constructor(service: BSNeoX<BSName>);
@@ -215,3 +215,4 @@ _Neo3NeoXBridgeService_service = new WeakMap(), _Neo3NeoXBridgeService_instances
215
215
  });
216
216
  };
217
217
  Neo3NeoXBridgeService.BRIDGE_SCRIPT_HASH = '0x1212000000000000000000000000000000000004';
218
+ Neo3NeoXBridgeService.BRIDGE_FEE = 0.1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neox",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": "https://github.com/CityOfZion/blockchain-services",