aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-26 09:53:22 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-26 09:53:22 +0800
commit27d9e516e1cf6a8bea469998bc92513bec3d91c5 (patch)
tree2db73b2d26e432236034c411f0edd62b94dd9144 /packages/instant/src/util
parent948d62200a23b4da59278f976e9757cfc3c9234e (diff)
parent4a96dbe085004be49dbbaa435d4552a9c920d823 (diff)
downloaddexon-sol-tools-27d9e516e1cf6a8bea469998bc92513bec3d91c5.tar
dexon-sol-tools-27d9e516e1cf6a8bea469998bc92513bec3d91c5.tar.gz
dexon-sol-tools-27d9e516e1cf6a8bea469998bc92513bec3d91c5.tar.bz2
dexon-sol-tools-27d9e516e1cf6a8bea469998bc92513bec3d91c5.tar.lz
dexon-sol-tools-27d9e516e1cf6a8bea469998bc92513bec3d91c5.tar.xz
dexon-sol-tools-27d9e516e1cf6a8bea469998bc92513bec3d91c5.tar.zst
dexon-sol-tools-27d9e516e1cf6a8bea469998bc92513bec3d91c5.zip
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/fixed-orders-in-render-method
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 0868414f0..844a28d8b 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}`;
},
};