From b1bf7401dcbb07abef95b550f48dcf498a1e6c8e Mon Sep 17 00:00:00 2001 From: Hammad-Mubeen Date: Tue, 18 Jan 2022 12:50:25 +0500 Subject: [PATCH] allowances function tested --- JsClients/ERC20/src/erc20.ts | 2 +- JsClients/ERC20/test/installed.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/JsClients/ERC20/src/erc20.ts b/JsClients/ERC20/src/erc20.ts index a4e71115..980ec57c 100644 --- a/JsClients/ERC20/src/erc20.ts +++ b/JsClients/ERC20/src/erc20.ts @@ -214,7 +214,7 @@ class ERC20Client { const maybeValue = result.value().unwrap(); return maybeValue.value().toString(); } catch (error) { - return error; + return "0"; } } diff --git a/JsClients/ERC20/test/installed.ts b/JsClients/ERC20/test/installed.ts index 15d85677..5bc242a7 100644 --- a/JsClients/ERC20/test/installed.ts +++ b/JsClients/ERC20/test/installed.ts @@ -257,4 +257,4 @@ export const allowance = async (contractHash:string, ownerkey:string, spenderkey }; -allowance("b761da7d5ef67f8825c30c40df8b72feca4724eb666dba556b0e3f67778143e0","8b217a09296d5ce360847a7d20f623476157c5f022333c4e988a464035cadd80","8a74e1ae230936013f3b544182b8011435f4a457d9444fa879ab483fdf829dc8"); \ No newline at end of file +//allowance("b761da7d5ef67f8825c30c40df8b72feca4724eb666dba556b0e3f67778143e0","8b217a09296d5ce360847a7d20f623476157c5f022333c4e988a464035cadd80","8a74e1ae230936013f3b544182b8011435f4a457d9444fa879ab483fdf829dc8"); \ No newline at end of file