aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-19 06:54:53 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-19 06:54:53 +0800
commit44635f34f0df4da935ed4793566995873aac5055 (patch)
tree2a17869fd79eefdd289efc1fea49c0d555dc207b
parentb4fb6b5ff3106c9223508469a2bee583bcea8da0 (diff)
downloaddexon-sol-tools-44635f34f0df4da935ed4793566995873aac5055.tar.gz
dexon-sol-tools-44635f34f0df4da935ed4793566995873aac5055.tar.zst
dexon-sol-tools-44635f34f0df4da935ed4793566995873aac5055.zip
fix: error test undefined case
-rw-r--r--packages/instant/src/util/asset.ts4
-rw-r--r--packages/instant/test/util/error.test.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/instant/src/util/asset.ts b/packages/instant/src/util/asset.ts
index e0d5ffcb7..a105a7c2b 100644
--- a/packages/instant/src/util/asset.ts
+++ b/packages/instant/src/util/asset.ts
@@ -37,9 +37,9 @@ export const assetUtils = {
const metaData = asset.metaData;
switch (metaData.assetProxyId) {
case AssetProxyId.ERC20:
- return metaData.symbol;
+ return metaData.symbol.toUpperCase();
case AssetProxyId.ERC721:
- return metaData.name;
+ return metaData.name.toUpperCase();
default:
return defaultName;
}
diff --git a/packages/instant/test/util/error.test.ts b/packages/instant/test/util/error.test.ts
index b009db91a..90e9c5fb4 100644
--- a/packages/instant/test/util/error.test.ts
+++ b/packages/instant/test/util/error.test.ts
@@ -48,7 +48,7 @@ describe('errorUtil', () => {
});
it('should return default for AssetUnavailable error', () => {
const assetUnavailableError = new Error(`${AssetBuyerError.AssetUnavailable}: For assetData xyz`);
- expect(errorUtil.errorDescription(assetUnavailableError, ZRX_ASSET).message).toEqual(
+ expect(errorUtil.errorDescription(assetUnavailableError, undefined).message).toEqual(
'This asset is currently unavailable',
);
});