Skip to content

Commit

Permalink
chore: minor RSK fixes (#671)
Browse files Browse the repository at this point in the history
* chore: minor RSK fixes

* chore: add missing strings

---------

Co-authored-by: Kilian <19181985+kilrau@users.noreply.github.com>
  • Loading branch information
michael1011 and kilrau authored Oct 1, 2024
1 parent 08c65bb commit abb4c7f
Show file tree
Hide file tree
Showing 3 changed files with 11 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
6 changes: 5 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 Expand Up @@ -280,6 +281,7 @@ const dict = {
pay_address: "Adresse",
no_wallet: "Wallet ist nicht installiert",
connect_wallet: "Wallet verbinden",
please_connect_wallet: "Bitte Wallet verbinden",
connect_to_address: "Mit Swap-Adresse verbinden",
disconnect_address: "Wallet trennen",
lockup_failed: "Lockup fehlgeschlagen!",
Expand Down Expand Up @@ -500,6 +502,7 @@ const dict = {
pay_address: "Dirección",
no_wallet: "Monedero no está instalado",
connect_wallet: "Conectar monedero",
please_connect_wallet: "Por favor, conecte monedero",
connect_to_address: "Conectar con dirección de intercambio",
disconnect_address: "Desconectar monedero",
lockup_failed: "Fallo en el lockup",
Expand Down Expand Up @@ -718,6 +721,7 @@ const dict = {
pay_address: "地址",
no_wallet: "未安装钱包",
connect_wallet: "连接钱包",
please_connect_wallet: "请连接钱包",
connect_to_address: "连接交换地址",
disconnect_address: "断开钱包",
lockup_failed: "锁仓失败!",
Expand Down

0 comments on commit abb4c7f

Please sign in to comment.