Skip to content

Commit

Permalink
fix breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
elclandestin0 committed Dec 20, 2024
1 parent e3e64e8 commit 9b3b66e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
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

0 comments on commit 9b3b66e

Please sign in to comment.