Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix breaking change #266

Merged
merged 1 commit into from
Dec 20, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface ActionButtonProps {
isDisabled: boolean
L2L3message?: { destination: string; data: string }
setErrorMessage: (arg0: string) => void
bridger: Bridger
bridger: Bridger | null
symbol?: string
decimals?: number
balance?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@ const BridgeView = ({
setSelectedBridgeToken(token)
}
const { getEstimatedFee, useAllowances } = useBridger()

const originChainId = direction === 'DEPOSIT' ? selectedLowNetwork.chainId : selectedHighNetwork.chainId
const destinationChainId = direction === 'DEPOSIT' ? selectedHighNetwork.chainId : selectedLowNetwork.chainId
const [bridger, setBridger] = useState<Bridger>(getBridger(originChainId, destinationChainId, selectedBridgeToken.tokenAddressMap))

const [bridger, setBridger] = useState<Bridger | null>(null)


const estimatedFee = getEstimatedFee({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface MultiTokenApprovalProps {
setShowApproval: (showApproval: boolean) => void
balance: string | undefined
nativeBalance: string | undefined
bridger: Bridger
bridger: Bridger | null
decimals: number | undefined
tokens: Token[]
startingTokenIndex: number
Expand Down
4 changes: 2 additions & 2 deletions webapps/world-builder-dashboard/src/hooks/useBridger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const useBridger = () => {
selectedHighNetwork,
tokenInformation
}: {
bridger: Bridger
bridger: Bridger | null
value: string
direction: 'DEPOSIT' | 'WITHDRAW'
selectedLowNetwork: NetworkInterface
Expand Down Expand Up @@ -111,7 +111,7 @@ export const useBridger = () => {
selectedHighNetwork,
connectedAccount
}: {
bridger: Bridger
bridger: Bridger | null
direction: DepositDirection
selectedLowNetwork: NetworkInterface
selectedHighNetwork: NetworkInterface
Expand Down
Loading