Browse Source
Always patch operations if some contained `blockHeight: null`
closes #1000
master
meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
1 changed files with
3 additions and
0 deletions
-
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<Transaction>) => ( |
|
|
|
<FeesBitcoinKind |
|
|
|
onChange={feePerByte => { |
|
|
@ -135,6 +137,7 @@ const LibcoreBridge: WalletBridge<Transaction> = { |
|
|
|
|
|
|
|
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 || |
|
|
|