-
-
Notifications
You must be signed in to change notification settings - Fork 256
feat: Adding requestId field to dapp confirmations #7415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 7 commits
2cfdb03
9abf1e0
665775d
71b0332
c645831
d58f206
35a452d
c75349a
741816f
ddd24c9
b7ed73e
a209dc8
e854e88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,6 +101,8 @@ export async function processSendCalls( | |
| const securityAlertId = uuid(); | ||
| const validateSecurity = validateSecurityHook.bind(null, securityAlertId); | ||
|
|
||
| const requestId = String(req.id); | ||
jpuri marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| let batchId: Hex; | ||
| if (Object.keys(transactions).length === 1) { | ||
| batchId = await processSingleTransaction({ | ||
|
|
@@ -110,6 +112,7 @@ export async function processSendCalls( | |
| messenger, | ||
| networkClientId, | ||
| origin, | ||
| requestId, | ||
| securityAlertId, | ||
| sendCalls: params, | ||
| transactions, | ||
|
|
@@ -126,6 +129,7 @@ export async function processSendCalls( | |
| messenger, | ||
| networkClientId, | ||
| origin, | ||
| requestId, | ||
| sendCalls: params, | ||
| securityAlertId, | ||
| transactions, | ||
|
|
@@ -147,6 +151,7 @@ export async function processSendCalls( | |
| * @param params.messenger - Messenger instance for controller communication. | ||
| * @param params.networkClientId - The network client ID. | ||
| * @param params.origin - The origin of the request (optional). | ||
| * @param params.requestId - Unique requestId of the JSON-RPC request from DAPP. | ||
| * @param params.securityAlertId - The security alert ID for this transaction. | ||
| * @param params.sendCalls - The original sendCalls request. | ||
| * @param params.transactions - Array containing the single transaction. | ||
|
|
@@ -161,6 +166,7 @@ async function processSingleTransaction({ | |
| messenger, | ||
| networkClientId, | ||
| origin, | ||
| requestId, | ||
| securityAlertId, | ||
| sendCalls, | ||
| transactions, | ||
|
|
@@ -173,6 +179,7 @@ async function processSingleTransaction({ | |
| messenger: EIP5792Messenger; | ||
| networkClientId: string; | ||
| origin?: string; | ||
| requestId?: string; | ||
| securityAlertId: string; | ||
| sendCalls: SendCallsPayload; | ||
| transactions: { params: BatchTransactionParams }[]; | ||
|
|
@@ -209,6 +216,7 @@ async function processSingleTransaction({ | |
| const batchId = generateBatchId(); | ||
|
|
||
| await addTransaction(txParams, { | ||
| requestId, | ||
| networkClientId, | ||
| origin, | ||
| securityAlertResponse: { securityAlertId } as SecurityAlertResponse, | ||
|
|
@@ -229,6 +237,7 @@ async function processSingleTransaction({ | |
| * @param params.networkClientId - The network client ID. | ||
| * @param params.messenger - Messenger instance for controller communication. | ||
| * @param params.origin - The origin of the request (optional). | ||
| * @param params.requestId - Unique requestId of the JSON-RPC request from DAPP. | ||
| * @param params.sendCalls - The original sendCalls request. | ||
| * @param params.securityAlertId - The security alert ID for this batch. | ||
| * @param params.transactions - Array of transactions to process. | ||
|
|
@@ -245,6 +254,7 @@ async function processMultipleTransaction({ | |
| networkClientId, | ||
| messenger, | ||
| origin, | ||
| requestId, | ||
| sendCalls, | ||
| securityAlertId, | ||
| transactions, | ||
|
|
@@ -259,6 +269,7 @@ async function processMultipleTransaction({ | |
| messenger: EIP5792Messenger; | ||
| networkClientId: string; | ||
| origin?: string; | ||
| requestId?: string; | ||
| sendCalls: SendCallsPayload; | ||
| securityAlertId: string; | ||
| transactions: { params: BatchTransactionParams }[]; | ||
|
|
@@ -295,6 +306,7 @@ async function processMultipleTransaction({ | |
| from, | ||
| networkClientId, | ||
| origin, | ||
| requestId, | ||
| securityAlertId, | ||
| transactions, | ||
| validateSecurity, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to note additions in changelog on this package and
transaction-controller?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, let me do that.