Skip to content

Commit

Permalink
Merge pull request #37 from MXCzkEVM/axsWalletOption
Browse files Browse the repository at this point in the history
feat: Added AXS wallet to wallet list
  • Loading branch information
wuzhenbin authored Sep 15, 2023
2 parents ce883d6 + ba222ca commit d7f72b6
Show file tree
Hide file tree
Showing 4 changed files with 413 additions and 19 deletions.
2 changes: 2 additions & 0 deletions packages/bridge-ui/src/components/ConnectWallet.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import { client as wagmiClient } from '../wagmi/client';
import CoinbaseWallet from './icons/CoinbaseWallet.svelte';
import MetaMask from './icons/MetaMask.svelte';
import AXS from './icons/AXS.svelte';
import WalletConnect from './icons/WalletConnect.svelte';
import Modal from './Modal.svelte';
import {
Expand Down Expand Up @@ -51,6 +52,7 @@
metamask: MetaMask,
walletconnect: WalletConnect,
'coinbase wallet': CoinbaseWallet,
'axs wallet': AXS
};
</script>

Expand Down
24 changes: 24 additions & 0 deletions packages/bridge-ui/src/components/icons/AXS.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script lang="ts">
export let width: number = 32;
</script>

<svg
width="113"
height="113"
viewBox="0 0 113 113"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<rect
x="0.0519714"
y="0.551758"
width="112"
height="112"
rx="16.128"
fill="#5077F7" />
<path
d="M94.5645 88.2587H74.9871L46.4149 40.2706L53.3849 28.5732L72.5115 60.6756C73.1232 61.701 74.2031 62.2685 75.3145 62.2685C75.8831 62.2685 76.4603 62.1187 76.9859 61.8047C78.5309 60.8772 79.0364 58.8696 78.1117 57.317L56.185 20.5137C55.2603 18.9611 53.2586 18.4571 51.7135 19.3846C51.2081 19.687 50.8175 20.1047 50.5504 20.5828C50.5389 20.6001 50.5274 20.6145 50.5188 20.6318L39.8211 38.5855C39.7637 38.6806 39.712 38.7785 39.6661 38.8794C39.6459 38.9254 39.6287 38.9715 39.6086 39.0176C39.5885 39.0695 39.5655 39.1184 39.5454 39.1732C39.5196 39.248 39.4966 39.3229 39.4765 39.3978C39.4708 39.4238 39.4593 39.4497 39.4535 39.4756C39.4334 39.5505 39.4219 39.6254 39.4076 39.7003C39.4018 39.7291 39.3961 39.7579 39.3904 39.7867C39.3817 39.8529 39.376 39.9192 39.3703 39.9883C39.3674 40.0286 39.3616 40.069 39.3588 40.1064C39.3588 40.1611 39.3588 40.213 39.3588 40.2677C39.3588 40.3224 39.3588 40.3743 39.3588 40.429C39.3588 40.4694 39.3645 40.5068 39.3703 40.5471C39.376 40.6134 39.3817 40.6825 39.3904 40.7488C39.3932 40.7776 39.4018 40.8035 39.4047 40.8323C39.4191 40.9101 39.4306 40.985 39.4507 41.0627C39.4564 41.0858 39.465 41.1088 39.4708 41.1319C39.4909 41.2096 39.5138 41.2874 39.5397 41.3623C39.5541 41.4055 39.5742 41.4487 39.5914 41.4919C39.6144 41.5466 39.6316 41.6014 39.6574 41.6532C39.7034 41.7511 39.7551 41.8491 39.8125 41.9441L70.3346 93.2044C70.3433 93.2217 70.3576 93.2361 70.3662 93.2505C70.4237 93.3398 70.484 93.429 70.5472 93.5126C70.5644 93.5356 70.5816 93.5615 70.6017 93.5846C70.6793 93.6796 70.7626 93.7718 70.8516 93.8582C70.8803 93.887 70.9119 93.913 70.9435 93.9418C71.0067 93.9994 71.0727 94.057 71.1416 94.1117C71.1761 94.1405 71.2134 94.1664 71.2479 94.1924C71.3283 94.25 71.4145 94.3047 71.5006 94.3537C71.5207 94.3652 71.5408 94.3796 71.5609 94.3911C71.6729 94.4516 71.7878 94.5063 71.9056 94.5553C71.9285 94.5639 71.9515 94.5726 71.9716 94.5812C72.0693 94.6187 72.1669 94.6504 72.2674 94.6792C72.299 94.6878 72.3335 94.6964 72.3651 94.7051C72.457 94.7281 72.5517 94.7454 72.6494 94.7598C72.6838 94.7656 72.7183 94.7713 72.7528 94.7742C72.8705 94.7886 72.9882 94.7973 73.1089 94.7973C73.1175 94.7973 73.1261 94.7973 73.1347 94.7973C73.1347 94.7973 73.1405 94.7973 73.1433 94.7973H94.5617C96.3623 94.7973 97.8241 93.334 97.8241 91.5251C97.8241 89.7162 96.3652 88.2529 94.5617 88.2529L94.5645 88.2587Z"
fill="white" />
<path
d="M98.0165 90.465C95.3773 81.8525 89.9437 74.1185 82.7239 68.6832C75.2542 63.0634 66.3571 60.0908 56.992 60.0908C47.6269 60.0908 38.6265 63.0951 31.128 68.784C23.8766 74.2827 18.4574 82.0973 15.8698 90.7905C15.3529 92.5216 16.3351 94.345 18.0611 94.8606C18.3741 94.9527 18.6871 94.9988 18.9973 94.9988C19.1409 94.9988 19.2816 94.9844 19.4223 94.9643L44.3817 95.0824H44.3931C44.3931 95.0824 44.3989 95.0824 44.4018 95.0824C44.4161 95.0824 44.4276 95.0824 44.442 95.0824C44.5568 95.0824 44.6717 95.0737 44.7837 95.0593C44.8239 95.0536 44.867 95.0478 44.9072 95.0392C45.002 95.0247 45.0939 95.0046 45.1829 94.9844C45.2202 94.9758 45.2576 94.9671 45.2949 94.9556C45.5534 94.8807 45.8004 94.7742 46.0301 94.6417C46.0445 94.633 46.0588 94.6301 46.0703 94.6215C46.0933 94.6071 46.1105 94.5927 46.1335 94.5783C46.1852 94.5466 46.234 94.512 46.2828 94.4775C46.3259 94.4458 46.369 94.417 46.4092 94.3824C46.4494 94.3507 46.4867 94.319 46.5241 94.2874C46.57 94.247 46.6131 94.2096 46.6562 94.1664C46.6878 94.1376 46.7165 94.1059 46.7452 94.0742C46.7883 94.0281 46.8342 93.982 46.8744 93.9331C46.9003 93.9014 46.9261 93.8697 46.952 93.8351C46.9922 93.7862 47.0295 93.7372 47.064 93.6853C47.0898 93.6479 47.1157 93.6105 47.1386 93.5701C47.1702 93.5212 47.199 93.4751 47.2277 93.4261C47.2535 93.38 47.2765 93.3339 47.3023 93.285C47.3253 93.2418 47.3454 93.1957 47.3684 93.1525C47.3914 93.0977 47.4143 93.043 47.4344 92.9883C47.4517 92.9451 47.466 92.9047 47.4804 92.8615C47.5005 92.8039 47.5177 92.7463 47.5321 92.6858C47.5436 92.6426 47.5551 92.5965 47.5666 92.5533C47.5809 92.4986 47.5895 92.441 47.601 92.3834C47.6096 92.3315 47.6182 92.2797 47.6269 92.2278C47.6326 92.1789 47.6383 92.127 47.6412 92.0781C47.647 92.0176 47.6498 91.9542 47.6527 91.8937C47.6527 91.8707 47.6556 91.8476 47.6556 91.8246C47.6556 91.8044 47.6556 91.7843 47.6556 91.7612C47.6556 91.695 47.6527 91.6287 47.647 91.5653C47.6441 91.5221 47.6412 91.4761 47.6355 91.4328C47.6297 91.3724 47.6182 91.3119 47.6096 91.2514C47.601 91.2024 47.5924 91.1534 47.5838 91.1074C47.5723 91.0555 47.5579 91.0008 47.5436 90.9489C47.5292 90.8942 47.5149 90.8424 47.4976 90.7876C47.4833 90.7415 47.466 90.6983 47.4488 90.6523C47.4258 90.5946 47.4029 90.537 47.3799 90.4794C47.3626 90.4391 47.3425 90.4016 47.3224 90.3613C47.2937 90.3008 47.2621 90.2432 47.2305 90.1856C47.2191 90.1683 47.2133 90.1482 47.2018 90.1309L40.1658 78.3211C39.241 76.7714 37.2393 76.2645 35.6914 77.192C34.1463 78.1195 33.6409 80.1271 34.5656 81.6797L38.6351 88.5121L23.6755 88.4401C29.4193 75.4061 42.5408 66.6323 56.9949 66.6323C73.0802 66.6323 87.0604 76.9817 91.7846 92.3863C92.313 94.1145 94.1395 95.0824 95.8598 94.5524C97.5829 94.0224 98.5478 92.1904 98.0194 90.465H98.0165Z"
fill="white" />
</svg>
6 changes: 6 additions & 0 deletions packages/bridge-ui/src/wagmi/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { MetaMaskConnector } from '@wagmi/core/connectors/metaMask';
import { WalletConnectConnector } from '@wagmi/core/connectors/walletConnect';
import { jsonRpcProvider } from '@wagmi/core/providers/jsonRpc';
import { publicProvider } from '@wagmi/core/providers/public';
import { InjectedConnector } from '@wagmi/connectors/injected'

import {
L1_CHAIN_ID,
Expand Down Expand Up @@ -69,6 +70,11 @@ export const client = createClient({
autoConnect: true,
provider,
connectors: [
new InjectedConnector({
options: {
name: 'AXS Wallet',
},
}),
new MetaMaskConnector({ chains }),
new CoinbaseWalletConnector({
chains,
Expand Down
Loading

0 comments on commit d7f72b6

Please sign in to comment.