Skip to content

Commit

Permalink
support dynamic get new token from oraichain
Browse files Browse the repository at this point in the history
  • Loading branch information
toandq2009 committed Dec 31, 2024
1 parent 64bc82f commit c027e04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/extension/src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "OWallet",
"description": "OWallet: BTC x COSMOS x EVM x TRON x OASIS x SOLANA in one Wallet",
"version": "3.1.35",
"version": "3.1.36",
"icons": {
"16": "assets/icon-16.png",
"48": "assets/icon-48.png",
Expand Down
11 changes: 5 additions & 6 deletions apps/extension/src/pages/home/home-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ export const HomePage = observer(() => {
`https://raw.githubusercontent.com/owallet-io/oraichain-sdk/refs/heads/master/chains/Oraichain.json`
)
.then((res) => {
console.log(res, "Resss");
if (res && res.currencies?.length > 0) {
// const currencyOrai: AppCurrency[] = [];
const currencyOrai: AppCurrency[] = [];
for (const currency of res.currencies) {
const {
coinDenom,
Expand All @@ -121,11 +120,11 @@ export const HomePage = observer(() => {
coinDecimals: coinDecimals,
coinDenom: coinDenom,
};
// currencyOrai.push(token);
tokensStore.addToken("Oraichain", token);
currencyOrai.push(token);
// tokensStore.addToken("Oraichain", token);
}
// const OraiChain = chainStore.getChain("Oraichain");
// OraiChain.addCurrencies(...currencyOrai);
const OraiChain = chainStore.getChain("Oraichain");
OraiChain.addCurrencies(...currencyOrai);
}
})
.catch((err) => console.log(err, "Errr"));
Expand Down

0 comments on commit c027e04

Please sign in to comment.