Feat/friendtech key holder airdrop - #6
Conversation
Sbmitchell/fix
ModalSelector simplified + No CSV option in friendtech drop
Fixed ETH usecase
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| // ? recipientsParser(tokenDecimals).parse(recipients) | ||
| // : [] | ||
| // ) as AirdropRecipient[]; | ||
| // } catch (e) { |
There was a problem hiding this comment.
get rid of all this commented out code?
| @@ -1 +1 @@ | |||
| export type ModalSelector = 'confirm' | 'congrats'; | |||
| export type ModalSelector = 'confirm' | 'congrats' | ''; | |||
There was a problem hiding this comment.
Previously a certain line would be be const [openModal, setOpenModal] = useState<ModalSelector | false>(false);. With an empty string option within ModalSelector it's simpler. (const [openModal, setOpenModal] = useState<ModalSelector>("");)
But I've just noticed that I've only edited it within FriendtechProvider.tsx and it's in the old way in ETH, ERC20 and ERC721 Providers. Should I revert that change, or introduce it in the remaining providers for consistency?
There was a problem hiding this comment.
i like an empty string over false as the default state so we don't mix types
|
|
||
| const handleERC20 = (value: string) => { | ||
| const regex = /^0x[a-fA-F0-9]{40}(?= ?[^ ])([=,]?) *(\d+(\.\d+)?)$/; | ||
| const regex = /^0x[a-fA-F0-9]{40}(?= ?[^ ])([=,]?) *(\d*(\.\d*)?)$/; |
There was a problem hiding this comment.
According to @smitch88, "I put up a PR @PopPunkOnChain I also changed the regex so it takes .1 not just 0.*"
| <textarea | ||
| value={textareaValue} | ||
| className="w-full min-h-[300px] max-h-[600px] mt-4 p-3 text-black border-black border-2 rounded-md" | ||
| className="w-full min-h-[200px] max-h-[400px] mt-4 p-3 text-black border-black border-2 rounded-md" // adjusted the heights |
There was a problem hiding this comment.
can prob remove this comment
Add support for easy friend tech key holder airdrops