Skip to content

Commit

Permalink
📈 add contract and method to deposit and borrow TX completed track call
Browse files Browse the repository at this point in the history
  • Loading branch information
sebipap committed Jan 30, 2024
1 parent 663fd9c commit 27d1a49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hooks/useBorrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ export default (): Borrow => {

const { status, transactionHash } = await waitForTransaction({ hash });
track('TX Completed', {
contractName: 'Market',
method: 'borrow',
symbol,
amount: qty,
usdAmount: formatUnits((amount * marketAccount.usdPrice) / WEI_PER_ETHER, marketAccount.decimals),
Expand Down
2 changes: 2 additions & 0 deletions hooks/useDeposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ export default (): Deposit => {

const { status, transactionHash } = await waitForTransaction({ hash });
track('TX Completed', {
contractName: 'Market',
method: 'deposit',
symbol,
amount: qty,
usdAmount: formatUnits((amount * marketAccount.usdPrice) / WEI_PER_ETHER, marketAccount.decimals),
Expand Down

0 comments on commit 27d1a49

Please sign in to comment.