Skip to content

Commit

Permalink
remove console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
vinhyenvodoi98 committed Oct 5, 2024
1 parent b865aef commit 7542c36
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 32 deletions.
31 changes: 13 additions & 18 deletions components/FramePreviewButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,21 @@ export function FramePreviewButton({
// get transaction
const tx = await getTxData(button.target as string)
// check chain
console.log(tx)
await sendTransactionAsync({
chainId: Number(tx.chainId.split(":")[1]),
to: tx.params.to,
value: tx.params.value,
data: tx.params.data
},{
onSettled () {
toast.loading("Transaction Pending")
},
onSuccess () {
toast.success("Transfer Successful!")
},
onError(error:any) {
toast.error(error.cause.shortMessage)
},
})
await sendTransactionAsync({
chainId: Number(tx.chainId.split(":")[1]),
to: tx.params.to,
value: tx.params.value,
data: tx.params.data
},{
onSuccess () {
toast.success("Transfer Successful!")
},
onError(error:any) {
toast.error(error.cause.shortMessage)
},
})
} else {
// open reown connect modal
console.log(account)
ModalController.open()
}
break
Expand Down
3 changes: 0 additions & 3 deletions components/foundation/ConnectButton.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions templates/fundraiser/handlers/txData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@ export default async function txData({
if (!session.unsignedTransaction) {
throw new FrameError('Missing transaction')
}
const transaction = {
chainId: session.unsignedTransaction.chainId,
method: 'eth_sendTransaction',
params: {
to: session.unsignedTransaction.to,
value: session.unsignedTransaction.value,
data: session.unsignedTransaction.input,
abi: [],
},
}
console.log(transaction)
return {
transaction: {
chainId: session.unsignedTransaction.chainId,
Expand Down

0 comments on commit 7542c36

Please sign in to comment.