Skip to content

Commit

Permalink
only set receiver amount on send blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
tammo committed Mar 30, 2020
1 parent d294ecd commit b097b4b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,16 @@ export class Block {
throw new Error('Balance is too big. Please use the bigint type.');
}

this.receiverAmount = amount.toString();
this.senderAmount = amount.toString();
this.senderBalance = balance.toString();

if (prev) {
this.prev = prev.signature;
}

if (this.type === BlockType.SEND) {
this.receiverAmount = amount.toString();
}
}
}

Expand Down

0 comments on commit b097b4b

Please sign in to comment.