Skip to content

Commit

Permalink
fix: checksum zkSync Lite token addresses, wbtc icon
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed Mar 29, 2023
1 parent 2ed515b commit ac4cafe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/json/tokens/lite-tokens-icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"small": "https://assets.coingecko.com/coins/images/3406/small/SNX.png?1598631139",
"large": "https://assets.coingecko.com/coins/images/3406/large/SNX.png?1598631139"
},
"WBTC": {
"wBTC": {
"thumb": "https://assets.coingecko.com/coins/images/7598/thumb/wrapped_bitcoin_wbtc.png?1548822744",
"small": "https://assets.coingecko.com/coins/images/7598/small/wrapped_bitcoin_wbtc.png?1548822744",
"large": "https://assets.coingecko.com/coins/images/7598/large/wrapped_bitcoin_wbtc.png?1548822744"
Expand Down
6 changes: 3 additions & 3 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
</div>
<div class="token-balances-container">
<template v-if="balanceInProgress">
<TokenBalanceLoader v-for="index in 1" :key="index" />
<TokenBalanceLoader v-for="index in 2" :key="index" />
</template>
<CommonErrorBlock v-else-if="balanceError" class="m-3 mt-0" @try-again="fetch">
<CommonErrorBlock v-else-if="balanceError" class="m-3 mb-2.5 -mt-1" @try-again="fetch">
{{ balanceError.message }}
</CommonErrorBlock>
<template v-else>
Expand Down Expand Up @@ -103,7 +103,7 @@ const displayedBalances = computed(() => {
}
.tokens-container {
.token-balances-container {
@apply -mx-3 -mb-3;
@apply -mx-3 -mt-1 -mb-3;
}
}
</style>
3 changes: 2 additions & 1 deletion store/zksync/lite/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineStore } from "pinia";
import type { TokenInfo } from "zksync/build/types";

import { useLiteProviderStore } from "@/store/zksync/lite/provider";
import { checksumAddress } from "@/utils/formatters";
import { getTokenIconUrlBySymbol } from "@/utils/tokens/lite";

export interface ZkSyncLiteToken extends TokenInfo {
Expand All @@ -26,7 +27,7 @@ export const useLiteTokensStore = defineStore("liteTokens", () => {
return Object.fromEntries(
Object.entries(tokens).map(([symbol, token]) => {
const iconUrl = getTokenIconUrlBySymbol(symbol);
return [symbol, { ...token, price: 1, iconUrl }];
return [symbol, { ...token, address: checksumAddress(token.address), price: 1, iconUrl }];
})
);
});
Expand Down

0 comments on commit ac4cafe

Please sign in to comment.