Browse Source
Merge pull request #866 from gre/optimistic-op-id
Use another representation for op id to fix Details blink
master
Meriadec Pillet
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
3 deletions
-
src/commands/libcoreSignAndBroadcast.js
-
src/helpers/libcore.js
|
|
@ -210,7 +210,7 @@ export async function doSignAndBroadcast({ |
|
|
|
|
|
|
|
// NB we don't check isCancelled() because the broadcast is not cancellable now!
|
|
|
|
onOperationBroadcasted({ |
|
|
|
id: txHash, |
|
|
|
id: `${account.xpub}-${txHash}-OUT`, |
|
|
|
hash: txHash, |
|
|
|
type: 'OUT', |
|
|
|
value: transaction.amount, |
|
|
|
|
|
@ -428,7 +428,6 @@ function buildOperationRaw({ |
|
|
|
op: NJSOperation, |
|
|
|
xpub: string, |
|
|
|
}): OperationRaw { |
|
|
|
const id = op.getUid() |
|
|
|
const bitcoinLikeOperation = op.asBitcoinLikeOperation() |
|
|
|
const bitcoinLikeTransaction = bitcoinLikeOperation.getTransaction() |
|
|
|
const hash = bitcoinLikeTransaction.getHash() |
|
|
@ -448,6 +447,8 @@ function buildOperationRaw({ |
|
|
|
value += fee |
|
|
|
} |
|
|
|
|
|
|
|
const id = `${xpub}-${hash}-${type}` |
|
|
|
|
|
|
|
return { |
|
|
|
id, |
|
|
|
hash, |
|
|
@ -458,7 +459,7 @@ function buildOperationRaw({ |
|
|
|
recipients: op.getRecipients(), |
|
|
|
blockHeight: op.getBlockHeight(), |
|
|
|
blockHash: null, |
|
|
|
accountId: xpub, |
|
|
|
accountId: xpub, // FIXME accountId: xpub !?
|
|
|
|
date: op.getDate().toISOString(), |
|
|
|
} |
|
|
|
} |
|
|
|