diff --git a/components/forms/TransactionSigning.js b/components/forms/TransactionSigning.js index aded4bc..60bfab9 100644 --- a/components/forms/TransactionSigning.js +++ b/components/forms/TransactionSigning.js @@ -5,6 +5,7 @@ import { SigningStargateClient } from "@cosmjs/stargate"; import { registry } from "@cosmjs/proto-signing"; import Button from "../inputs/Button"; +import HashView from "../dataViews/HashView"; import StackableContainer from "../layout/StackableContainer"; export default class TransactionSigning extends React.Component { @@ -16,6 +17,7 @@ export default class TransactionSigning extends React.Component { walletAccount: null, walletError: null, sigError: null, + hasSigned: false, }; } @@ -58,7 +60,10 @@ export default class TransactionSigning extends React.Component { const walletAccount = await window.keplr.getKey( process.env.NEXT_PUBLIC_CHAIN_ID ); - this.setState({ walletAccount }); + const hasSigned = this.props.signatures.some( + (sig) => sig.address === walletAccount.bech32Address + ); + this.setState({ walletAccount, hasSigned }); } catch (e) { console.log("enable err: ", e); } @@ -112,11 +117,28 @@ export default class TransactionSigning extends React.Component { render() { return ( -

Sign this transaction

- {this.state.walletAccount ? ( -