Skip to content

Commit

Permalink
Merge pull request #182 from blocknative/develop
Browse files Browse the repository at this point in the history
Release 1.5.1
  • Loading branch information
dmarzzz authored Dec 16, 2020
2 parents 06eb30c + 503e3c5 commit ce7d420
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
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

0 comments on commit ce7d420

Please sign in to comment.