generated from scaffold-eth/scaffold-eth-2
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2d2620
commit e1a50c1
Showing
13 changed files
with
125 additions
and
45 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
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
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
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ import { | |
} from "~~/types/business"; | ||
import { ERC20_ABI, ERC721_ABI, ERC1155_ABI } from "~~/utils/constants"; | ||
import { getTargetNetwork } from "~~/utils/scaffold-eth"; | ||
import { useShowError } from "./useShowError"; | ||
|
||
const erc20Interface = new ethers.utils.Interface(ERC20_ABI); | ||
const erc721Interface = new ethers.utils.Interface(ERC721_ABI); | ||
|
@@ -24,6 +25,7 @@ export const useAutodetectAssets = () => { | |
[account: string]: RecoveryTx[]; | ||
}>("autoDetectedAssets", {}); | ||
|
||
const {showError} = useShowError(); | ||
const targetNetwork = getTargetNetwork(); | ||
const [alchemy] = useState<Alchemy>( | ||
new Alchemy({ | ||
|
@@ -51,6 +53,7 @@ export const useAutodetectAssets = () => { | |
.map(res => res.transfers) | ||
.flat(); | ||
|
||
|
||
const getAutodetectedAssets = async ( | ||
hackedAddress: string, | ||
safeAddress: string, | ||
|
@@ -65,7 +68,7 @@ export const useAutodetectAssets = () => { | |
return; | ||
} | ||
if (!alchemy) { | ||
alert("Seems Alchemy API rate limit has been reached. Contact [email protected]"); | ||
showError("Seems Alchemy API rate limit has been reached. Contact [email protected]"); | ||
return; | ||
} | ||
|
||
|
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
Oops, something went wrong.