Skip to content
Merged

Beta #97

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion viat/blocks/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class Block {
this.setMeta('nonce', this.cipherSuite.createBlockNonce(this.nonceSize));
}
async createSignature(wallet) {
const binary = await this.exportDataBinary();
const binary = this.block.hash;
const signature = await wallet.signPartial(binary);
return signature;
}
Expand Down
2 changes: 2 additions & 0 deletions viat/wallet/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export class Wallet extends CryptoID {
}
});
await txBlock.finalize();
await txBlock.sign(this);
await txBlock.createReceipt();
await txBlock.receipt.finalize();
await txBlock.receipt.sign(this);
console.log('Transaction Block:', txBlock.block);
return txBlock;
}
Expand Down
Loading