-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from melnikga/feat/token-transfers-tab
Contract page token transfers - Issue #40
- Loading branch information
Showing
4 changed files
with
202 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
import { Address } from "viem"; | ||
import AddressTokenTransfers from "@/components/pages/address/address-token-transfers"; | ||
import { getLatestTransferEvents } from "@/lib/fetch-data"; | ||
|
||
const AddressTokenTransfersPage = ({ | ||
|
||
const AddressTokenTransfersPage = async ({ | ||
params: { address }, | ||
}: { | ||
params: { address: string }; | ||
}) => <AddressTokenTransfers address={address as Address} />; | ||
params: { address: Address }; | ||
}) => { | ||
let transferEvents; | ||
try { | ||
transferEvents = await getLatestTransferEvents(address); | ||
console.log("Transfer:", transferEvents); | ||
} catch (error) { | ||
console.error("Error Transfer:", error); | ||
} | ||
return( | ||
<AddressTokenTransfers address={address as Address} erc20Transfers={transferEvents} | ||
/> | ||
) | ||
}; | ||
|
||
export default AddressTokenTransfersPage; |
118 changes: 117 additions & 1 deletion
118
src/components/pages/address/address-token-transfers.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters