From 55d72abcd776f992fccdf42fb2a2f5b320728504 Mon Sep 17 00:00:00 2001 From: meriadec Date: Wed, 11 Jul 2018 18:08:41 +0200 Subject: [PATCH] Always patch operations if some contained `blockHeight: null` closes #1000 --- src/bridge/LibcoreBridge.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bridge/LibcoreBridge.js b/src/bridge/LibcoreBridge.js index 55f021ce..d4beb761 100644 --- a/src/bridge/LibcoreBridge.js +++ b/src/bridge/LibcoreBridge.js @@ -28,6 +28,8 @@ type Transaction = { const decodeOperation = (encodedAccount, rawOp) => decodeAccount({ ...encodedAccount, operations: [rawOp] }).operations[0] +const hadSomeNullBlockHeight = ops => ops.some(op => op.blockHeight === null) + const EditFees = ({ account, onChange, value }: EditProps) => ( { @@ -135,6 +137,7 @@ const LibcoreBridge: WalletBridge = { const hasChanged = accountOps.length !== syncedOps.length || // size change, we do a full refresh for now... + hadSomeNullBlockHeight(accountOps) || // a bit berzerk, but in the future we will want to patch ops 1 by 1 (accountOps.length > 0 && syncedOps.length > 0 && (accountOps[0].accountId !== syncedOps[0].accountId ||