Skip to content

Commit 796e802

Browse files
Merge pull request #258 from terra-money/disable-shuttle-bsc-eth
Disable shuttle from ETH and BSC at 15 Aug 2023 15:00:00 SGT
2 parents fe3aede + 54dd1da commit 796e802

2 files changed

Lines changed: 16 additions & 13 deletions

File tree

src/pages/Send/SendForm/WarningInfo.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ export const WarningInfo = (): ReactElement => {
172172
return 'For Terra to Terra transfers, if the Terra address at the receiving end is an exchange address, the transaction will require a “memo”'
173173
} else if (bridgeUsed === BridgeType.wormhole) {
174174
return 'Wormhole is currently not available on Terra Classic'
175+
} else if (
176+
Date.now() >= 1692104400000 &&
177+
bridgeUsed === BridgeType.shuttle &&
178+
fromBlockChain !== BlockChainType.hmy
179+
) {
180+
return 'Shuttle has been deprecated for ETH and BSC.'
175181
} else if (fromBlockChain !== toBlockChain) {
176182
return "Don't use exchange addresses for cross-chain transfers. Make sure that the token type is correct before making transfers to the exchanges."
177183
}

src/pages/Send/SendFormButton/NextOrApproveButton.tsx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,20 @@ const NextOrApproveButton = ({
7676
)
7777
}
7878

79+
const isDisabled =
80+
bridgeUsed === BridgeType.ibc ||
81+
bridgeUsed === BridgeType.wormhole ||
82+
(bridgeUsed === BridgeType.shuttle &&
83+
(Date.now() >= 1692104400000
84+
? fromBlockChain !== BlockChainType.hmy
85+
: fromBlockChain === BlockChainType.terra))
86+
7987
return (
8088
<Button
8189
onClick={onClickSendNextButton}
82-
disabled={
83-
!ableButton ||
84-
bridgeUsed === BridgeType.ibc ||
85-
bridgeUsed === BridgeType.wormhole ||
86-
(bridgeUsed === BridgeType.shuttle &&
87-
fromBlockChain === BlockChainType.terra)
88-
}
90+
disabled={!ableButton || isDisabled}
8991
>
90-
{bridgeUsed === BridgeType.ibc ||
91-
bridgeUsed === BridgeType.wormhole ||
92-
(bridgeUsed === BridgeType.shuttle &&
93-
fromBlockChain === BlockChainType.terra)
94-
? 'Not available'
95-
: 'Next'}
92+
{isDisabled ? 'Not available' : 'Next'}
9693
</Button>
9794
)
9895
}

0 commit comments

Comments
 (0)