Skip to content

Commit

Permalink
Fixed default signers initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
leo42 committed Dec 1, 2023
1 parent 10169c7 commit 89aad86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Fe/src/components/WalletCreateTx.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class WalletCreateTx extends React.Component {

state = {
recipients: [{address :"", amount: {lovelace:0}}],
signers: this.props.wallet.getSigners().map( (signer) => signer.isDefult ),
signers: this.props.wallet.getSigners().filter( (signer) => (signer.isDefault) ),
tokenData: {},
sendFrom : this.props.wallet.getDefaultAddress(),
sendAll: null,
Expand Down Expand Up @@ -40,6 +40,7 @@ class WalletCreateTx extends React.Component {
})
}
}
console.log(this.props.wallet.getSigners())
}


Expand Down
6 changes: 3 additions & 3 deletions Fe/src/components/WalletDelegation.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { ReactComponent as LoadingIcon } from '../html/assets/loading.svg';

function WalletDelegation(props) {
const wallet = props.wallet
const initialState = []
const initialState = []

wallet.getSigners().map( () =>
initialState.push(true)
wallet.getSigners().map( (signer) =>
initialState.push(signer.isDefault)
)
const [pool, setPool] = useState('');
const [signers, setCheckedState] = useState(initialState);
Expand Down

0 comments on commit 89aad86

Please sign in to comment.