aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-26 09:57:30 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-26 09:57:30 +0800
commit30809e646be02025d6f9e9ed0ff214d9ace681c8 (patch)
tree2bd1446ac81a2319a672709ca8ef9cb2dd07c643 /packages/instant/src/util
parentd5d99b9d2e3c793a95c68c1035246644b3ae80c6 (diff)
parent4a96dbe085004be49dbbaa435d4552a9c920d823 (diff)
downloaddexon-sol-tools-30809e646be02025d6f9e9ed0ff214d9ace681c8.tar
dexon-sol-tools-30809e646be02025d6f9e9ed0ff214d9ace681c8.tar.gz
dexon-sol-tools-30809e646be02025d6f9e9ed0ff214d9ace681c8.tar.bz2
dexon-sol-tools-30809e646be02025d6f9e9ed0ff214d9ace681c8.tar.lz
dexon-sol-tools-30809e646be02025d6f9e9ed0ff214d9ace681c8.tar.xz
dexon-sol-tools-30809e646be02025d6f9e9ed0ff214d9ace681c8.tar.zst
dexon-sol-tools-30809e646be02025d6f9e9ed0ff214d9ace681c8.zip
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/input-fees-rounding
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r--packages/instant/src/util/error.ts4
-rw-r--r--packages/instant/src/util/etherscan.ts4
2 files changed, 6 insertions, 2 deletions
diff --git a/packages/instant/src/util/error.ts b/packages/instant/src/util/error.ts
index 40fd24c7e..64c1f4885 100644
--- a/packages/instant/src/util/error.ts
+++ b/packages/instant/src/util/error.ts
@@ -46,6 +46,10 @@ const humanReadableMessageForError = (error: Error, asset?: Asset): string | und
return `${assetName} is currently unavailable`;
}
+ if (error.message === AssetBuyerError.SignatureRequestDenied) {
+ return 'You denied this transaction';
+ }
+
return undefined;
};
diff --git a/packages/instant/src/util/etherscan.ts b/packages/instant/src/util/etherscan.ts
index ffb08a382..cfc2578a3 100644
--- a/packages/instant/src/util/etherscan.ts
+++ b/packages/instant/src/util/etherscan.ts
@@ -14,11 +14,11 @@ const etherscanPrefix = (networkId: number): string | undefined => {
};
export const etherscanUtil = {
- getEtherScanTxnAddressIfExists: (txnHash: string, networkId: number) => {
+ getEtherScanTxnAddressIfExists: (txHash: string, networkId: number) => {
const prefix = etherscanPrefix(networkId);
if (_.isUndefined(prefix)) {
return;
}
- return `https://${prefix}etherscan.io/tx/${txnHash}`;
+ return `https://${prefix}etherscan.io/tx/${txHash}`;
},
};