Skip to content

Feat/friendtech key holder airdrop - #6

Merged
pop-punk merged 16 commits into
mainfrom
feat/friendtech-key-holder-airdrop
Sep 15, 2023
Merged

Feat/friendtech key holder airdrop#6
pop-punk merged 16 commits into
mainfrom
feat/friendtech-key-holder-airdrop

Conversation

@pop-punk

Copy link
Copy Markdown
Contributor

Add support for easy friend tech key holder airdrops

@vercel

vercel Bot commented Sep 15, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
gaslite-airdrop ❌ Failed (Inspect) Sep 15, 2023 4:44pm

@pop-punk
pop-punk merged commit b002dcf into main Sep 15, 2023
// ? recipientsParser(tokenDecimals).parse(recipients)
// : []
// ) as AirdropRecipient[];
// } catch (e) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get rid of all this commented out code?

@@ -1 +1 @@
export type ModalSelector = 'confirm' | 'congrats';
export type ModalSelector = 'confirm' | 'congrats' | '';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why | ''?

@kryptopaul kryptopaul Sep 15, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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*)?)$/;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can prob remove this comment

@kryptopaul kryptopaul mentioned this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants