Skip to content

Commit

Permalink
chore: minor RSK fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Sep 30, 2024
1 parent 08c65bb commit e3c0858
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/CreateButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const CreateButton = () => {
return;
}
if (assetReceive() === RBTC && !addressValid()) {
setButtonLabel({ key: "connect_wallet" });
setButtonLabel({ key: "please_connect_wallet" });
return;
}
if (swapType() !== SwapType.Submarine) {
Expand Down
6 changes: 5 additions & 1 deletion src/context/Web3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,11 @@ const Web3SignerProvider = (props: {
],
});
} catch (switchError) {
if (switchError.code === 4902) {
if (
switchError.code === 4902 ||
// Rabby does not set the correct error code
switchError.message.includes("Try adding the chain")
) {
await rawProvider().request({
method: "wallet_addEthereumChain",
params: [
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ const dict = {
pay_invoice_to:
"Pay this invoice about {{ amount }} {{ denomination }}",
pay_address: "Address",
no_wallet: "Wallet not installed",
no_wallet: "No wallet installed",
connect_wallet: "Connect wallet",
please_connect_wallet: "Please connect wallet",
connect_to_address: "Connect to swap address",
disconnect_address: "Disconnect wallet",
lockup_failed: "Lockup Failed!",
Expand Down

0 comments on commit e3c0858

Please sign in to comment.