Skip to content

Commit 9a767bc

Browse files
authored
Merge pull request #94 from liquality/fix/when-is-custom-token-added
fix: adding a custom token
2 parents d79a580 + 426ff6d commit 9a767bc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/store/getters.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,13 @@ export default {
245245
const fiat = assetFiatBalance(asset, new BN(balance));
246246
const marketCap = assetMarketCap(asset);
247247
const tokenBalance = account.balances[asset];
248-
const { type, matchingAsset } = cryptoassets[asset];
248+
let type = AssetTypes.erc20;
249+
let matchingAsset;
250+
251+
if (cryptoassets[asset]) {
252+
type = cryptoassets[asset].type;
253+
matchingAsset = cryptoassets[asset].matchingAsset;
254+
}
249255

250256
if (fiat) {
251257
hasFiat = true;

0 commit comments

Comments
 (0)