aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-10-03 04:44:11 +0800
committerkumavis <aaron@kumavis.me>2017-10-03 04:44:11 +0800
commitdf59ef9942a950a1c5437c69b1af4111f8c07817 (patch)
tree2e51934523a4be57d5b6888c531b23d30f232c0b /app
parentc9c0e6f674c06d30794c73994c7776eb68ebedc0 (diff)
downloadtangerine-wallet-browser-df59ef9942a950a1c5437c69b1af4111f8c07817.tar
tangerine-wallet-browser-df59ef9942a950a1c5437c69b1af4111f8c07817.tar.gz
tangerine-wallet-browser-df59ef9942a950a1c5437c69b1af4111f8c07817.tar.bz2
tangerine-wallet-browser-df59ef9942a950a1c5437c69b1af4111f8c07817.tar.lz
tangerine-wallet-browser-df59ef9942a950a1c5437c69b1af4111f8c07817.tar.xz
tangerine-wallet-browser-df59ef9942a950a1c5437c69b1af4111f8c07817.tar.zst
tangerine-wallet-browser-df59ef9942a950a1c5437c69b1af4111f8c07817.zip
tx state history - append note to first op of diff
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/tx-state-history-helper.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/scripts/lib/tx-state-history-helper.js b/app/scripts/lib/tx-state-history-helper.js
index 304069d57..ecf0d076e 100644
--- a/app/scripts/lib/tx-state-history-helper.js
+++ b/app/scripts/lib/tx-state-history-helper.js
@@ -20,8 +20,11 @@ function migrateFromSnapshotsToDiffs(longHistory) {
)
}
-function generateHistoryEntry(previousState, newState) {
- return jsonDiffer.compare(previousState, newState)
+function generateHistoryEntry(previousState, newState, note) {
+ const entry = jsonDiffer.compare(previousState, newState)
+ // Add a note to the first op, since it breaks if we append it to the entry
+ if (note && entry[0]) entry[0].note = note
+ return entry
}
function replayHistory(shortHistory) {