Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bnc-notify",
"version": "1.5.0",
"version": "1.5.1",
"description": "Show web3 users realtime transaction notifications",
"keywords": [
"ethereum",
Expand Down
14 changes: 9 additions & 5 deletions src/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,28 @@ export function handlePreFlightEvent(
status
} = preflightEvent

const contract = {
methodName: contractCall.methodName,
parameters: contractCall.params
let contract

if (contractCall) {
contract = {
methodName: contractCall.methodName,
parameters: contractCall.params
}
}

blocknative.event({
categoryCode: contractCall ? 'activeContract' : 'activeTransaction',
eventCode,
transaction: txDetails,
wallet: { balance },
contract
contract: contractCall ? contract : undefined
})

const transaction = {
...txDetails,
eventCode,
status,
contractCall
contractCall: contract ? contractCall : undefined
}

const emitterResult = emitter.emit(transaction)
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2663,9 +2663,9 @@ object-keys@^1.0.11, object-keys@^1.0.12:
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==

object-path@^0.11.4:
version "0.11.4"
resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.4.tgz#370ae752fbf37de3ea70a861c23bba8915691949"
integrity sha1-NwrnUvvzfePqcKhhwju6iRVpGUk=
version "0.11.5"
resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.5.tgz#d4e3cf19601a5140a55a16ad712019a9c50b577a"
integrity sha512-jgSbThcoR/s+XumvGMTMf81QVBmah+/Q7K7YduKeKVWL7N111unR2d6pZZarSk6kY/caeNxUDyxOvMWyzoU2eg==

object-resolve-path@^1.1.1:
version "1.1.1"
Expand Down