diff --git a/chains/mainnet/side.json b/chains/mainnet/side.json new file mode 100644 index 00000000..cbfc8041 --- /dev/null +++ b/chains/mainnet/side.json @@ -0,0 +1,81 @@ +{ + "chain_name": "SIDE-Testnet", + "api": [], + "rpc": [ + "https://testnet-rpc.side.one", + "https://testnet-rpc2.side.one" + ], + "faucet": "https://testnet.side.one/faucet", + "snapshot_provider": "", + "sdk_version": "0.45.6", + "coin_type": "118", + "min_tx_fee": "800", + "addr_prefix": "side", + "logo": "/logos/side.png", + "theme_color": "#161723", + "assets": [ + { + "base": "uside", + "symbol": "SIDE", + "name": "Side protocol", + "exponent": "6", + "coingecko_id": "usd-coin", + "logo": "side-SIDE", + "precision": 6 + }, + { + "base": "abtct", + "symbol": "BTCT", + "name": "Bitcoin Token", + "exponent": "8", + "coingecko_id": "bitcoin", + "logo": "", + "precision": 8 + }, + { + "base": "uusdc", + "symbol": "USDC", + "name": "USD Coin", + "exponent": "6", + "coingecko_id": "usd-coin", + "logo": "side-USDC", + "precision": 6 + }, + { + "base": "uusdt", + "symbol": "USDT", + "name": "Tether USD", + "exponent": "6", + "coingecko_id": "usd-coin", + "logo": "data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMzkuNDMgMjk1LjI3Ij48dGl0bGU+dGV0aGVyLXVzZHQtbG9nbzwvdGl0bGU+PHBhdGggZD0iTTYyLjE1LDEuNDVsLTYxLjg5LDEzMGEyLjUyLDIuNTIsMCwwLDAsLjU0LDIuOTRMMTY3Ljk1LDI5NC41NmEyLjU1LDIuNTUsMCwwLDAsMy41MywwTDMzOC42MywxMzQuNGEyLjUyLDIuNTIsMCwwLDAsLjU0LTIuOTRsLTYxLjg5LTEzMEEyLjUsMi41LDAsMCwwLDI3NSwwSDY0LjQ1YTIuNSwyLjUsMCwwLDAtMi4zLDEuNDVoMFoiIHN0eWxlPSJmaWxsOiM1MGFmOTU7ZmlsbC1ydWxlOmV2ZW5vZGQiLz48cGF0aCBkPSJNMTkxLjE5LDE0NC44djBjLTEuMi4wOS03LjQsMC40Ni0yMS4yMywwLjQ2LTExLDAtMTguODEtLjMzLTIxLjU1LTAuNDZ2MGMtNDIuNTEtMS44Ny03NC4yNC05LjI3LTc0LjI0LTE4LjEzczMxLjczLTE2LjI1LDc0LjI0LTE4LjE1djI4LjkxYzIuNzgsMC4yLDEwLjc0LjY3LDIxLjc0LDAuNjcsMTMuMiwwLDE5LjgxLS41NSwyMS0wLjY2di0yOC45YzQyLjQyLDEuODksNzQuMDgsOS4yOSw3NC4wOCwxOC4xM3MtMzEuNjUsMTYuMjQtNzQuMDgsMTguMTJoMFptMC0zOS4yNVY3OS42OGg1OS4yVjQwLjIzSDg5LjIxVjc5LjY4SDE0OC40djI1Ljg2Yy00OC4xMSwyLjIxLTg0LjI5LDExLjc0LTg0LjI5LDIzLjE2czM2LjE4LDIwLjk0LDg0LjI5LDIzLjE2djgyLjloNDIuNzhWMTUxLjgzYzQ4LTIuMjEsODQuMTItMTEuNzMsODQuMTItMjMuMTRzLTM2LjA5LTIwLjkzLTg0LjEyLTIzLjE1aDBabTAsMGgwWiIgc3R5bGU9ImZpbGw6I2ZmZjtmaWxsLXJ1bGU6ZXZlbm9kZCIvPjwvc3ZnPg==", + "precision": 6 + }, + { + "base": "uwbtc", + "coingecko_id": "bitcoin", + "exponent": "8", + "logo": "", + "name": "Wrapped BTC", + "precision": 8, + "symbol": "wBTC" + }, + { + "base": "ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349", + "symbol": "USDC", + "name": "USD Coin (ibc)", + "exponent": "6", + "coingecko_id": "usd-coin", + "logo": "side-USDC", + "precision": 6 + }, + { + "base": "ibc/4BDF2D63B8FFE3454AF30E9BC10D2D7979BD3A938D989889ABC94FC5B86F1E2D", + "symbol": "aUSDC", + "name": "aUSDC.axl (ibc)", + "exponent": "6", + "coingecko_id": "usd-coin", + "logo": "https://testnet.satellite.money/assets/tokens/uausdc.logo.svg", + "precision": 6 + } + ] +} diff --git a/src/layouts/components/NavBarWallet.vue b/src/layouts/components/NavBarWallet.vue index 2d0c69d5..98e1c038 100644 --- a/src/layouts/components/NavBarWallet.vue +++ b/src/layouts/components/NavBarWallet.vue @@ -1,8 +1,10 @@ @@ -83,7 +101,7 @@ const tipMsg = computed(() => { - diff --git a/src/modules/wallet/keplr.vue b/src/modules/wallet/keplr.vue index f1959a47..c8ce25b8 100644 --- a/src/modules/wallet/keplr.vue +++ b/src/modules/wallet/keplr.vue @@ -13,6 +13,7 @@ const selected = ref({} as ChainConfig) onMounted(() => { const chainStore = useBlockchain() selected.value = chainStore.current || Object.values(dashboard.chains)[0] + debugger; initParamsForKeplr() }) async function initParamsForKeplr() { diff --git a/src/modules/wallet/unisat.vue b/src/modules/wallet/unisat.vue new file mode 100644 index 00000000..2a04d56a --- /dev/null +++ b/src/modules/wallet/unisat.vue @@ -0,0 +1,104 @@ + + + + + + + + + {{ c.chainName }} + + + Add {{ selected.chainName }} TO Unisat Wallet + + + + + + If the chain is not offically support on Keplr, you can submit these parameters to enable Keplr. + + + diff --git a/src/router/index.ts b/src/router/index.ts index 7dc4a6d0..7030ae87 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -14,7 +14,7 @@ const router = createRouter({ router.beforeEach((to) => { const { chain } = to.params if(chain){ - const blockchain = useBlockchain() + const blockchain= useBlockchain() if(chain !== blockchain.chainName) { blockchain.setCurrent(chain.toString()) } diff --git a/src/stores/useWalletStore.ts b/src/stores/useWalletStore.ts index 5962287c..2843e72e 100644 --- a/src/stores/useWalletStore.ts +++ b/src/stores/useWalletStore.ts @@ -128,8 +128,11 @@ export const useWalletStore = defineStore('walletStore', { if(value) this.wallet = value }, suggestChain() { - // const router = useRouter() - router.push({path: '/wallet/keplr'}) + if (window.location.pathname === '/SIDE-Testnet') { + router.push({path: '/wallet/unisat'}) + } else { + router.push({path: '/wallet/keplr'}) + } } }, }); \ No newline at end of file