Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
fix(profiles): multisign transaction payload (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsobries authored Feb 23, 2022
1 parent cfae583 commit 32542f5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/profiles/source/wallet-transaction.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,17 @@ export class TransactionService implements ITransactionService {
if (this.canBeBroadcasted(id)) {
result = await this.#wallet.client().broadcast([transaction.data()]);
} else if (transaction.isMultiSignatureRegistration() || transaction.usesMultiSignature()) {
const { amount, fee, nonce, ...restOfThePayload } = transaction.data().data();

result = await this.#wallet
.coin()
.multiSignature()
.broadcast(JSON.parse(JSON.stringify(transaction.data().data(), null, 4)));
.broadcast({
...JSON.parse(JSON.stringify(restOfThePayload, undefined, 4)),
amount: amount.toString(),
fee: fee.toString(),
nonce: nonce.toString(),
});
}

if (result.accepted.includes(transaction.id())) {
Expand Down

0 comments on commit 32542f5

Please sign in to comment.