Skip to content

Commit

Permalink
block: add ref address
Browse files Browse the repository at this point in the history
  • Loading branch information
tammo committed Oct 7, 2020
1 parent 91aefdf commit 20ad204
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Block.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SigPublicKey } from './Keys';
import { StorageId } from './Storage';

export type EncryptedNumber = string;
Expand All @@ -12,6 +13,7 @@ export type SignatureData = {
senderAmount: string;
refBlock: Signature | undefined;
refAsset: string | undefined;
refAddress: SigPublicKey | undefined;
claimSignature: string | undefined;
payload: string | undefined;
};
Expand All @@ -34,6 +36,7 @@ export class Block {
prev: Signature | undefined;
refBlock: Signature | undefined;
refAsset: string | undefined;
refAddress: SigPublicKey | undefined;
claimSignature: string | undefined;
payload: string | undefined;
createdAt: number;
Expand All @@ -43,7 +46,7 @@ export class Block {
state?: string;

getDataForSignature(): SignatureData {
const { type, prev, senderBalance, senderAmount, refBlock, refAsset, claimSignature, payload } = this;
const { type, prev, senderBalance, senderAmount, refBlock, refAsset, refAddress, claimSignature, payload } = this;

return {
type,
Expand All @@ -52,6 +55,7 @@ export class Block {
senderAmount,
refBlock,
refAsset,
refAddress,
claimSignature,
payload,
};
Expand Down

0 comments on commit 20ad204

Please sign in to comment.