Skip to content

Commit 7a1ba6a

Browse files
committed
fix: Trigger refresh
1 parent 8454203 commit 7a1ba6a

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

packages/canonical-bridge/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"@solana/wallet-adapter-react": "^0",
3030
"@tronweb3/tronwallet-adapter-react-hooks": "^1",
3131
"@pancakeswap/uikit": "workspace:*",
32-
"@pancakeswap/localization": "workspace:*"
32+
"@pancakeswap/localization": "workspace:*",
33+
"@pancakeswap/hooks": "workspace:*"
3334
},
3435
"dependencies": {
3536
"@bnb-chain/canonical-bridge-widget": "0.5.15",

packages/canonical-bridge/src/views/index.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
} from '@bnb-chain/canonical-bridge-widget'
1212
import { useTheme } from 'styled-components'
1313
import { useAccount } from 'wagmi'
14+
import { useLastUpdated } from '@pancakeswap/hooks'
1415
import { RefreshingIcon } from '../components/RefreshingIcon'
1516
import { V1BridgeLink } from '../components/V1BridgeLink'
1617
import { chains, env } from '../configs'
@@ -35,15 +36,17 @@ export const CanonicalBridge = (props: CanonicalBridgeProps) => {
3536
const { currentLanguage } = useTranslation()
3637
const theme = useTheme()
3738
const toast = useToast()
39+
const { setLastUpdated: refresh } = useLastUpdated()
3840

3941
useEffect(() => {
4042
if (typeof document !== 'undefined') {
4143
const inputElement = document.querySelector('.bccb-widget-transfer-input')
4244
if (inputElement) {
4345
inputElement.setAttribute('pattern', '^[0-9]*[.,]?[0-9]*$')
46+
refresh()
4447
}
4548
}
46-
}, [])
49+
}, [refresh])
4750

4851
const config = useMemo<ICanonicalBridgeConfig>(
4952
() => ({

pnpm-lock.yaml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)