Skip to content

Commit

Permalink
add type to TokenForwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Apr 5, 2024
1 parent ff7e7cb commit 8a825dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions contracts/utility/TokenForwarding.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import "FungibleToken"
access(all) contract TokenForwarding {

// Event that is emitted when tokens are deposited to the target receiver
access(all) event ForwardedDeposit(amount: UFix64, depositedUUID: UInt64, from: Address?, to: Address?, toUUID: UInt64)
access(all) event ForwardedDeposit(amount: UFix64, depositedUUID: UInt64, from: Address?, to: Address?, toUUID: UInt64, depositedType: Type)

access(all) resource interface ForwarderPublic {

Expand Down Expand Up @@ -55,9 +55,9 @@ access(all) contract TokenForwarding {

let uuid = from.uuid

receiverRef.deposit(from: <-from)
emit ForwardedDeposit(amount: balance, depositedUUID: uuid, from: self.owner?.address, to: receiverRef.owner?.address, toUUID: receiverRef.uuid, depositedType: from.getType())

emit ForwardedDeposit(amount: balance, depositedUUID: uuid, from: self.owner?.address, to: receiverRef.owner?.address, toUUID: receiverRef.uuid)
receiverRef.deposit(from: <-from)
}

/// Helper function to check whether set `recipient` capability
Expand Down
6 changes: 3 additions & 3 deletions lib/go/contracts/internal/assets/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8a825dc

Please sign in to comment.