Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Airdrop feature #88

Merged
merged 47 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4ff4c29
feat: get tokens markdown
JayJay1024 Jan 18, 2022
97a80d2
feat: log in github btn
JayJay1024 Jan 18, 2022
dce795e
Airdrop api
fewensa Jan 18, 2022
6e2306f
Fix wrong secret key
fewensa Jan 18, 2022
1c739df
Api redirect
fewensa Jan 18, 2022
0e4e24b
Fix redirect
fewensa Jan 18, 2022
1cffffa
Fix origin
fewensa Jan 18, 2022
5eabdaf
fear(airdrop): comfirm modal btn
JayJay1024 Jan 18, 2022
2dc4971
feat(airdrop): comfirm modal title
JayJay1024 Jan 18, 2022
40fa9f1
fear(airdrop): loading modal
JayJay1024 Jan 18, 2022
da99229
feat(airdrop): not available claim
JayJay1024 Jan 18, 2022
7d6d9f0
feat(airdrop): destination
JayJay1024 Jan 18, 2022
54c2754
feat(airdrop): comfirm and claim
JayJay1024 Jan 18, 2022
e71f2ed
feat(airdrop): congratulation
JayJay1024 Jan 18, 2022
7bd11ca
feat: login action
JayJay1024 Jan 18, 2022
373657d
Merge branch 'jay-airdrop-claim' into airdrop-api
JayJay1024 Jan 18, 2022
b797e0d
fix: build failed
JayJay1024 Jan 18, 2022
1750866
fix: svg file name
JayJay1024 Jan 18, 2022
2340004
fix: cant resolve some svg file
JayJay1024 Jan 18, 2022
c6077e0
chore: check get user info
JayJay1024 Jan 19, 2022
f21d23b
chore: check authorize
JayJay1024 Jan 19, 2022
5a94919
chore: update link
JayJay1024 Jan 19, 2022
257a173
chore: update modals
JayJay1024 Jan 19, 2022
cfa5596
chore: beta check
JayJay1024 Jan 19, 2022
c3db2dc
chore: check transfer
JayJay1024 Jan 19, 2022
6d1c7aa
chore: error or warning notice
JayJay1024 Jan 19, 2022
39b43f9
chore: optimize oauth process
JayJay1024 Jan 19, 2022
3226faf
chore: remove unuse log
JayJay1024 Jan 19, 2022
1dbdf42
chore: update oauth header
JayJay1024 Jan 19, 2022
8f84432
test
fewensa Jan 19, 2022
198ab50
Merge remote-tracking branch 'origin/airdrop-api' into airdrop-api
fewensa Jan 19, 2022
a3b2bbf
chore: check catch error response
JayJay1024 Jan 19, 2022
7ae270a
Merge branch 'airdrop-api' of github.com:darwinia-network/crab-docs i…
JayJay1024 Jan 19, 2022
47ba0d9
chore: update claim fail case
JayJay1024 Jan 19, 2022
954b342
fix: claim fail notice
JayJay1024 Jan 19, 2022
dbab9fe
Query airdrop state
fewensa Jan 20, 2022
8834ef8
Merge branch 'airdrop-api' of https://github.com/darwinia-network/cra…
fewensa Jan 20, 2022
aeecaa0
Try fix
fewensa Jan 20, 2022
c7cf706
Add state for no login
fewensa Jan 20, 2022
74a4af1
Change secrets
fewensa Jan 20, 2022
12b5b91
fix ci
fewensa Jan 20, 2022
c9fe84f
chore: check state api
JayJay1024 Jan 20, 2022
e4967d7
chore: update user state check
JayJay1024 Jan 20, 2022
be10a9f
chore: update airdrop amount
JayJay1024 Jan 20, 2022
5af5151
chore: remove unuse and update login action
JayJay1024 Jan 20, 2022
97c6cca
chore: update grant origin
JayJay1024 Jan 20, 2022
96e222a
chore: revert grant origin
JayJay1024 Jan 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: check transfer
  • Loading branch information
JayJay1024 committed Jan 19, 2022
commit c3db2dcca0aff05c0e552b21e4978ea12632dfae
2 changes: 1 addition & 1 deletion src/component/ClaimAirdrop/SubComponent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import clsx from 'clsx';
import { Modal, Spin, Space, Button } from 'antd';
import { Modal, Spin, Space } from 'antd';

import styles from '../styles.module.scss';
import TwitterIcon from './img/Twitter.svg';
Expand Down
19 changes: 7 additions & 12 deletions src/component/ClaimAirdrop/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ const getUserInfo = () => {
};

const sendClaimTrans = (address='') => {
return axios.post('/api/airdrop/transfer', {
address: address,
return axios({
url: '/api/airdrop/transfer',
method: 'post',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
data: `address=${address}`,
});
};

Expand All @@ -37,15 +40,7 @@ type Props = {
}

const ClaimAirdrop: React.FC<Props> = ({ className }) => {
// const [userInfo, setUserInfo] = useState(null);
const [userInfo, setUserInfo] = useState({
avatar: "https://avatars.githubusercontent.com/u/21007682?v=4",
created_at: "2016-08-13T11:56:58Z",
id: 21007682,
name: "JayJay1024",
type: "User",
updated_at: "2021-12-27T05:56:05Z",
});
const [userInfo, setUserInfo] = useState(null);
const [subviewLink, setSubviewLink] = useState('#');
const [destinationAddress, setDestinationAddress] = useState(null);

Expand Down Expand Up @@ -83,7 +78,7 @@ const ClaimAirdrop: React.FC<Props> = ({ className }) => {

const handleClickComfirmAndClaim = () => {
if (destinationAddress) {
setVisibleInputDestinationModal(false);
setVisibleComfirmModal(false);
setVisibleLoadingModal(true);

sendClaimTrans(destinationAddress)
Expand Down