Skip to content

Commit

Permalink
fix: airdrop volume
Browse files Browse the repository at this point in the history
  • Loading branch information
ByFishh committed Dec 5, 2023
1 parent ef076a6 commit b7b44fc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
26 changes: 13 additions & 13 deletions src/blockchains/scroll/airdrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ const getAirdrop = async (wallet: Wallet): Promise<Airdrop> => {
items: [
{
label: 'You’ve conducted transactions during 2 distinct months',
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) > 2,
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) >= 2,
},
{
label: 'You’ve conducted transactions during 6 distinct months',
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) > 6,
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) >= 6,
},
{
label: 'You’ve conducted transactions during 9 distinct months',
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) > 9,
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) >= 9,
},
],
},
Expand All @@ -51,19 +51,19 @@ const getAirdrop = async (wallet: Wallet): Promise<Airdrop> => {
items: [
{
label: 'You’ve conducted more than 4 transactions OR interacted with more than 4 smart contracts',
checked: wallet.interaction.total > 4 || wallet.contract.total > 4,
checked: wallet.interaction.total >= 4 || wallet.contract.total >= 4,
},
{
label: 'You’ve conducted more than 10 transactions OR interacted with more than 10 smart contracts',
checked: wallet.interaction.total > 10 || wallet.contract.total > 10,
checked: wallet.interaction.total >= 10 || wallet.contract.total >= 10,
},
{
label: 'You’ve conducted more than 25 transactions OR interacted with more than 25 smart contracts',
checked: wallet.interaction.total > 25 || wallet.contract.total > 25,
checked: wallet.interaction.total >= 25 || wallet.contract.total >= 25,
},
{
label: 'You’ve conducted more than 100 transactions OR interacted with more than 100 smart contracts',
checked: wallet.interaction.total > 100 || wallet.contract.total > 100,
checked: wallet.interaction.total >= 100 || wallet.contract.total >= 100,
},
],
},
Expand All @@ -72,15 +72,15 @@ const getAirdrop = async (wallet: Wallet): Promise<Airdrop> => {
items: [
{
label: 'You’ve conducted transactions with more than $10,000',
checked: wallet.volume.total > 10000,
checked: wallet.volume.total >= 10000,
},
{
label: 'You’ve conducted transactions with more than $50,000',
checked: wallet.volume.total > 50000,
checked: wallet.volume.total >= 50000,
},
{
label: 'You’ve conducted transactions with more than $250,000',
checked: wallet.volume.total > 250000,
checked: wallet.volume.total >= 250000,
},
],
},
Expand All @@ -89,15 +89,15 @@ const getAirdrop = async (wallet: Wallet): Promise<Airdrop> => {
items: [
{
label: 'You’ve deposited more than $10,000 in ETH',
checked: wallet.protocols.find((protocol) => protocol.id === 'scrollbridge')!.volume > 10000,
checked: wallet.protocols.find((protocol) => protocol.id === 'scrollbridge')!.volume >= 10000,
},
{
label: 'You’ve deposited more than $50,000 in ETH',
checked: wallet.protocols.find((protocol) => protocol.id === 'scrollbridge')!.volume > 50000,
checked: wallet.protocols.find((protocol) => protocol.id === 'scrollbridge')!.volume >= 50000,
},
{
label: 'You’ve deposited more than $250,000 in ETH',
checked: wallet.protocols.find((protocol) => protocol.id === 'scrollbridge')!.volume > 250000,
checked: wallet.protocols.find((protocol) => protocol.id === 'scrollbridge')!.volume >= 250000,
},
],
},
Expand Down
34 changes: 18 additions & 16 deletions src/blockchains/zksync/airdrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ const getAirdrop = async (wallet: Wallet): Promise<Airdrop> => {
items: [
{
label: 'You’ve conducted transactions during 2 distinct months',
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) > 2,
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) >= 2,
},
{
label: 'You’ve conducted transactions during 6 distinct months',
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) > 6,
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) >= 6,
},
{
label: 'You’ve conducted transactions during 9 distinct months',
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) > 9,
checked: Number(wallet.additionalInfos.find((info) => info.label === 'Unique months')!.value) >= 9,
},
],
},
Expand All @@ -51,19 +51,19 @@ const getAirdrop = async (wallet: Wallet): Promise<Airdrop> => {
items: [
{
label: 'You’ve conducted more than 4 transactions OR interacted with more than 4 smart contracts',
checked: wallet.interaction.total > 4 || wallet.contract.total > 4,
checked: wallet.interaction.total >= 4 || wallet.contract.total >= 4,
},
{
label: 'You’ve conducted more than 10 transactions OR interacted with more than 10 smart contracts',
checked: wallet.interaction.total > 10 || wallet.contract.total > 10,
checked: wallet.interaction.total >= 10 || wallet.contract.total >= 10,
},
{
label: 'You’ve conducted more than 25 transactions OR interacted with more than 25 smart contracts',
checked: wallet.interaction.total > 25 || wallet.contract.total > 25,
checked: wallet.interaction.total >= 25 || wallet.contract.total >= 25,
},
{
label: 'You’ve conducted more than 100 transactions OR interacted with more than 100 smart contracts',
checked: wallet.interaction.total > 100 || wallet.contract.total > 100,
checked: wallet.interaction.total >= 100 || wallet.contract.total >= 100,
},
],
},
Expand All @@ -72,15 +72,15 @@ const getAirdrop = async (wallet: Wallet): Promise<Airdrop> => {
items: [
{
label: 'You’ve conducted transactions with more than $10,000',
checked: wallet.volume.total > 10000,
checked: wallet.volume.total >= 10000,
},
{
label: 'You’ve conducted transactions with more than $50,000',
checked: wallet.volume.total > 50000,
checked: wallet.volume.total >= 50000,
},
{
label: 'You’ve conducted transactions with more than $250,000',
checked: wallet.volume.total > 250000,
checked: wallet.volume.total >= 250000,
},
],
},
Expand All @@ -89,15 +89,15 @@ const getAirdrop = async (wallet: Wallet): Promise<Airdrop> => {
items: [
{
label: 'You’ve deposited more than $10,000 in ETH',
checked: wallet.protocols.find((protocol) => protocol.id === 'zksyncbridge')!.volume > 10000,
checked: wallet.protocols.find((protocol) => protocol.id === 'zksyncbridge')!.volume >= 10000,
},
{
label: 'You’ve deposited more than $50,000 in ETH',
checked: wallet.protocols.find((protocol) => protocol.id === 'zksyncbridge')!.volume > 50000,
checked: wallet.protocols.find((protocol) => protocol.id === 'zksyncbridge')!.volume >= 50000,
},
{
label: 'You’ve deposited more than $250,000 in ETH',
checked: wallet.protocols.find((protocol) => protocol.id === 'zksyncbridge')!.volume > 250000,
checked: wallet.protocols.find((protocol) => protocol.id === 'zksyncbridge')!.volume >= 250000,
},
],
},
Expand All @@ -106,16 +106,18 @@ const getAirdrop = async (wallet: Wallet): Promise<Airdrop> => {
items: [
{
label: 'You’ve conducted transactions more than 3 transactions.',
checked: Number(wallet.additionalInfos.find((info) => info.label === 'ZkSyncLite interactions')!.value) > 3,
checked:
Number(wallet.additionalInfos.find((info) => info.label === 'ZkSyncLite interactions')!.value) >= 3,
},
{
label: 'You’ve conducted transactions more than 5 transactions.',
checked: Number(wallet.additionalInfos.find((info) => info.label === 'ZkSyncLite interactions')!.value) > 5,
checked:
Number(wallet.additionalInfos.find((info) => info.label === 'ZkSyncLite interactions')!.value) >= 5,
},
{
label: 'You’ve conducted transactions more than 10 transactions.',
checked:
Number(wallet.additionalInfos.find((info) => info.label === 'ZkSyncLite interactions')!.value) > 10,
Number(wallet.additionalInfos.find((info) => info.label === 'ZkSyncLite interactions')!.value) >= 10,
},
],
},
Expand Down

0 comments on commit b7b44fc

Please sign in to comment.