Skip to content

Commit

Permalink
fix: vote confirm (#2446)
Browse files Browse the repository at this point in the history
  • Loading branch information
sokolova-an authored Oct 10, 2024
1 parent 18c3ae4 commit c5b1063
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/renderer/widgets/VoteModal/aggregates/voteModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,17 @@ sample({
clock: voteConfirmModel.events.sign,
source: { confirms: voteConfirmModel.$confirmMap },
fn: ({ confirms }): { signingPayloads: SigningPayload[] } => {
const confirm = confirms[0];
if (!confirm) {
if (!confirms) {
return { signingPayloads: [] };
}

const { meta, accounts } = confirm;

return {
signingPayloads: [
{
account: accounts.proxy || accounts.initiator,
chain: meta.chain,
transaction: meta.wrappedTransactions.wrappedTx,
signatory: accounts.signer || undefined,
},
],
signingPayloads: Object.values(confirms).map(({ meta, accounts }) => ({
account: accounts.proxy || accounts.initiator,
chain: meta.chain,
transaction: meta.wrappedTransactions.wrappedTx,
signatory: accounts.signer || undefined,
})),
};
},
target: signModel.events.formInitiated,
Expand Down

0 comments on commit c5b1063

Please sign in to comment.