Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions advanced/wallets/react-wallet-v2/next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
reactStrictMode: true,
typescript: {
ignoreBuildErrors: true,
},
webpack(config) {
config.resolve.fallback = {
...config.resolve.fallback,
Expand Down
4 changes: 2 additions & 2 deletions advanced/wallets/react-wallet-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@polkadot/keyring": "^10.1.2",
"@polkadot/types": "^9.3.3",
"@reown/appkit-experimental": "1.6.8",
"@reown/walletkit": "1.0.0",
"@reown/walletkit": "1.1.2-canary-ca-1",
"@rhinestone/module-sdk": "0.1.25",
"@solana/web3.js": "1.89.2",
"@taquito/signer": "^15.1.0",
Expand Down Expand Up @@ -63,7 +63,7 @@
"tiny-secp256k1": "^2.2.3",
"tronweb": "^4.4.0",
"valtio": "1.13.2",
"viem": "2.17.8",
"viem": "2.23.2",
"webauthn-p256": "0.0.2"
},
"devDependencies": {
Expand Down
Binary file added advanced/wallets/react-wallet-v2/public/bridge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions advanced/wallets/react-wallet-v2/src/components/BridgeBadge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Icon } from '@mui/material'
import bridgeIcon from './../../public/bridge.png'

export default function BridgeBadge() {
return (
<div
style={{
width: 27,
height: 27,
borderRadius: 12,
backgroundColor: '#363636',
flexDirection: 'row',
justifyContent: 'space-evenly'
}}
>
<img
style={{
width: 16,
height: 16,
margin: 5
}}
src="./../../bridge.png"
/>
</div>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Hex } from 'viem'

export default function ChainAbstractionBalanceCard() {
const { eip155Address } = useSnapshot(SettingsStore.state)
const [balances, setBalances] = useState<Record<string, Record<string, number>>>({})
const [balances, setBalances] = useState<Record<string, Record<string, string>>>({})
const [totalBalance, setTotalBalance] = useState<Record<string, number>>({})
const [loading, setLoading] = useState(true)
useEffect(() => {
Expand All @@ -20,7 +20,7 @@ export default function ChainAbstractionBalanceCard() {

const fetchedBalances: Record<string, any> = {}
for (const asset of Object.keys(multibridgeSupportedAssets)) {
const assetBalances: Record<string, number> = {}
const assetBalances: Record<string, string> = {}
for (const chainId of Object.keys(multibridgeSupportedAssets[asset])) {
const tokenAddress = multibridgeSupportedAssets[asset][Number(chainId)]
const balance = await getErc20TokenBalance(
Expand All @@ -43,7 +43,7 @@ export default function ChainAbstractionBalanceCard() {
for (const asset of Object.keys(balances)) {
let total = 0
for (const chainBalance of Object.values(balances[asset])) {
total += chainBalance
total += parseFloat(chainBalance)
}
totalBalances[asset] = total
}
Expand Down
Loading