aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util
diff options
context:
space:
mode:
authorSteve Klebanoff <steve@0xproject.com>2018-10-25 04:22:04 +0800
committerGitHub <noreply@github.com>2018-10-25 04:22:04 +0800
commit979527a5ee3efaf2974703b91b0af3440195219e (patch)
tree83693ace2b44420db7942b67ff28ec0577fc120c /packages/instant/src/util
parent059868e9942fed4616750d212e706f09d17f397b (diff)
parent05ce8aa124ae4d912ef43a9cf70a30ac2704867a (diff)
downloaddexon-0x-contracts-979527a5ee3efaf2974703b91b0af3440195219e.tar
dexon-0x-contracts-979527a5ee3efaf2974703b91b0af3440195219e.tar.gz
dexon-0x-contracts-979527a5ee3efaf2974703b91b0af3440195219e.tar.bz2
dexon-0x-contracts-979527a5ee3efaf2974703b91b0af3440195219e.tar.lz
dexon-0x-contracts-979527a5ee3efaf2974703b91b0af3440195219e.tar.xz
dexon-0x-contracts-979527a5ee3efaf2974703b91b0af3440195219e.tar.zst
dexon-0x-contracts-979527a5ee3efaf2974703b91b0af3440195219e.zip
Merge pull request #1180 from 0xProject/feature/instant/metamask-denial
[instant]Message when signature denied
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r--packages/instant/src/util/error.ts4
1 files changed, 4 insertions, 0 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;
};