Skip to content

Commit

Permalink
feat: show address on EVM send screen (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 authored Oct 4, 2024
1 parent e203f9c commit c3a0baa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/ContractTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ const ContractTransaction = ({
showHr,
onClick,
address,
children,
promptText,
buttonText,
waitingText,
}: {
onClick: () => Promise<any>;
children?: any;
address: string;
buttonText: string;
promptText?: string;
Expand Down Expand Up @@ -63,6 +65,7 @@ const ContractTransaction = ({
<Show when={promptText}>
<p>{promptText}</p>
</Show>
<Show when={children !== undefined}>{children}</Show>
<button
class="btn"
disabled={clicked()}
Expand Down
3 changes: 3 additions & 0 deletions src/components/LockupEvm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Show, createEffect, createSignal } from "solid-js";
import { useGlobalContext } from "../context/Global";
import { useWeb3Signer } from "../context/Web3";
import { prefix0x, satoshiToWei } from "../utils/rootstock";
import ConnectWallet from "./ConnectWallet";
import ContractTransaction from "./ContractTransaction";

const InsufficientBalance = () => {
Expand All @@ -11,6 +12,7 @@ const InsufficientBalance = () => {
return (
<>
<p>{t("insufficient_balance_line")}</p>
<ConnectWallet />
<button class="btn" disabled={true}>
{t("insufficient_balance")}
</button>
Expand Down Expand Up @@ -69,6 +71,7 @@ const LockupEvm = ({
currentSwap.lockupTx = tx.hash;
await setSwapStorage(currentSwap);
}}
children={<ConnectWallet />}
address={signerAddress}
buttonText={t("send")}
promptText={t("transaction_prompt", { button: t("send") })}
Expand Down

0 comments on commit c3a0baa

Please sign in to comment.