From 1c418ad9463ffa8cee5a7cd944656ed221947f10 Mon Sep 17 00:00:00 2001 From: "vadim.nicolai-EXT" Date: Fri, 7 Apr 2023 18:29:24 +0300 Subject: [PATCH 1/2] feat: utils - bn.js utility wrappers. --- core/utils/mod.ts | 6 +++++- core/utils/parseUnits.ts | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 core/utils/parseUnits.ts diff --git a/core/utils/mod.ts b/core/utils/mod.ts index 2f302f6..4d57ed8 100644 --- a/core/utils/mod.ts +++ b/core/utils/mod.ts @@ -1,5 +1,9 @@ +import * as dotUtils from '@polkadot/util'; + +export { dotUtils }; + export * from './contractTxUtils.ts'; export * from './contracts/mod.ts'; export * from './getExpiredItem.ts'; -export * from './parseUnits.ts'; export * from './pseudoRandomId.ts'; + diff --git a/core/utils/parseUnits.ts b/core/utils/parseUnits.ts deleted file mode 100644 index cb38776..0000000 --- a/core/utils/parseUnits.ts +++ /dev/null @@ -1,4 +0,0 @@ -import BN from 'bn.js'; - -export const stringNumberToBN = (valWithCommas: string): typeof BN => - new BN(valWithCommas.split(',').join('')); From 59aea96a414bbf85ef3dcb545ec4189c4e42ed73 Mon Sep 17 00:00:00 2001 From: "vadim.nicolai-EXT" Date: Sat, 8 Apr 2023 17:42:59 +0300 Subject: [PATCH 2/2] Small improvement. --- core/utils/mod.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/core/utils/mod.ts b/core/utils/mod.ts index 4d57ed8..68a001d 100644 --- a/core/utils/mod.ts +++ b/core/utils/mod.ts @@ -6,4 +6,3 @@ export * from './contractTxUtils.ts'; export * from './contracts/mod.ts'; export * from './getExpiredItem.ts'; export * from './pseudoRandomId.ts'; -