Skip to content

Commit

Permalink
using the sender/issuer address from the event rather than transactio…
Browse files Browse the repository at this point in the history
…n.from in order to accomodate Gnosis Safe execTransaction
  • Loading branch information
FlacoJones committed Feb 16, 2023
1 parent 81ba7e3 commit 4a0e3e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/mappings/handleBountyCreated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ export default function handleBountyCreated(event: BountyCreated): void {
bounty.alternativeLogo = decodedTuple[7].toString()
}

let user = User.load(event.transaction.from.toHexString())
let user = User.load(event.params.issuerAddress.toHexString())

if (!user) {
user = new User(event.transaction.from.toHexString())
user = new User(event.params.issuerAddress.toHexString())
user.save()
}

Expand Down
4 changes: 2 additions & 2 deletions src/mappings/handleNftDepositReceived.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export default function handleNftDepositReceived(event: NFTDepositReceived): voi
deposit.refunded = false

// UPSERT USER
let user = User.load(event.transaction.from.toHexString())
let user = User.load(event.params.sender.toHexString())

if (!user) {
user = new User(event.transaction.from.toHexString())
user = new User(event.params.sender.toHexString())
user.save()
}

Expand Down
4 changes: 2 additions & 2 deletions src/mappings/handleTokenDepositReceived.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export default function handleTokenDepositReceived(event: TokenDepositReceived):
deposit.funderUuid = decodedTuple[0].toString()

// UPSERT USER
let user = User.load(event.transaction.from.toHexString())
let user = User.load(event.params.sender.toHexString())

if (!user) {
user = new User(event.transaction.from.toHexString())
user = new User(event.params.sender.toHexString())
user.save()
}

Expand Down

0 comments on commit 4a0e3e9

Please sign in to comment.