Skip to content

Commit 0483fe7

Browse files
committed
Web wallet fixes
1 parent 04bb4b1 commit 0483fe7

File tree

1 file changed

+34
-12
lines changed

1 file changed

+34
-12
lines changed

extensions/walletd-spent-transfers-tracking-mode.json

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"todo1": "probably not working correctly with orphan blocks. 'visible' is always 1 on m_trackingModeSpentTransfers",
3-
"todo2": "transfers with only <UNKNOWN> are not returned when search is only with address. Huge optimization will be to know which <UNKNOWN> belongs to which address",
43
"file": "walletd-spent-transfers-tracking-mode.json",
54
"description": "Adds 'spent transfers' list in walletd in tracking mode.",
65
"required": [
@@ -157,18 +156,30 @@
157156
{
158157
"path": "/src/Transfers/TransfersContainer.cpp",
159158
"changes": [
160-
{
161-
"action": "replace",
162-
"marker": "updateTransfersVisibility(info.keyImage);",
163-
"parameters": {
164-
"text": [
165-
"if (trackingMode == 0) {",
166-
" updateTransfersVisibility(info.keyImage);",
167-
"}"
168-
]
169-
}
170-
},
159+
{
160+
"action": "replace",
161+
"marker": "updateTransfersVisibility(transfer.keyImage);",
162+
"parameters": {
163+
"text": [
164+
" if (trackingMode == 0) {",
165+
" updateTransfersVisibility(transfer.keyImage);",
166+
" }"
167+
]
168+
}
169+
},
170+
171171

172+
{
173+
"action": "replace",
174+
"marker": "updateTransfersVisibility(info.keyImage);",
175+
"parameters": {
176+
"text": [
177+
"if (trackingMode == 0) {",
178+
" updateTransfersVisibility(info.keyImage);",
179+
"}"
180+
]
181+
}
182+
},
172183
{
173184
"action": "replace",
174185
"marker": "static_assert(sizeof(size_t) < sizeof(*m_keyImage), \"sizeof(size_t) < sizeof(*m_keyImage)\");",
@@ -212,6 +223,7 @@
212223
"marker": "return other.m_type == m_type && *other.m_keyImage == *m_keyImage;",
213224
"parameters": {
214225
"text": [
226+
215227
" if (m_trackingMode == 1) {",
216228
" return other.m_type == m_type && other.m_amount == m_amount && other.m_globalOutputIndex == m_globalOutputIndex;",
217229
" } else {",
@@ -491,6 +503,16 @@
491503
" bool added = transfers.addTransaction(trackingMode, blockInfo, tx, transfersList);"
492504
]
493505
}
506+
},
507+
{
508+
"action": "replace",
509+
"marker": "transfers.markTransactionConfirmed(block, transactionHash, globalIndices);",
510+
"parameters": {
511+
"text": [
512+
" bool trackingMode = subscription.keys.spendSecretKey == NULL_SECRET_KEY;",
513+
" transfers.markTransactionConfirmed(trackingMode, block, transactionHash, globalIndices);;"
514+
]
515+
}
494516
}
495517
]
496518
},

0 commit comments

Comments
 (0)