From 4acccb3976c6898f9cb659d9b0ea6eb3b2ff358d Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Wed, 28 Nov 2018 10:46:09 -0800 Subject: [PATCH] fix: add flowtype for SignaturePubkeyPair --- web3.js/module.flow.js | 5 +++++ web3.js/src/transaction.js | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/web3.js/module.flow.js b/web3.js/module.flow.js index f9afffac51..f882810064 100644 --- a/web3.js/module.flow.js +++ b/web3.js/module.flow.js @@ -110,6 +110,11 @@ declare module '@solana/web3.js' { userdata: Buffer; } + declare type SignaturePubkeyPair = {| + signature: Buffer | null, + publicKey: PublicKey, + |}; + declare type TransactionCtorFields = {| fee?: number, lastId?: TransactionId, diff --git a/web3.js/src/transaction.js b/web3.js/src/transaction.js index e8f3eb6d20..876fd7ca4a 100644 --- a/web3.js/src/transaction.js +++ b/web3.js/src/transaction.js @@ -62,6 +62,14 @@ export class TransactionInstruction { } } +/** + * @private + */ +type SignaturePubkeyPair = {| + signature: Buffer | null, + publicKey: PublicKey, +|}; + /** * List of Transaction object fields that may be initialized at construction * @@ -77,14 +85,6 @@ type TransactionCtorFields = {| signatures?: Array, |}; -/** - * @private - */ -type SignaturePubkeyPair = {| - signature: Buffer | null, - publicKey: PublicKey, -|}; - /** * Transaction class */