Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add swap and fix donate #72

Merged
merged 21 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
08d3d50
updated useContractCalls and much of DonateComponent
krisbitney Dec 29, 2023
9abd3c4
added useApproveSwapTokenCallback and useSwapRoute
krisbitney Dec 29, 2023
4e02064
draft swap integration
krisbitney Dec 30, 2023
31ff9ae
added index to hooks/useContractCalls
krisbitney Dec 30, 2023
5d33d59
prevented swap from G$ to G$
krisbitney Dec 30, 2023
56cd466
fixed formatting and some swap bugs
krisbitney Dec 30, 2023
5404b97
removed unused function from lib
krisbitney Dec 30, 2023
1e2603e
Merge remote-tracking branch 'origin/kris/realtime-donation-flow' int…
krisbitney Dec 30, 2023
aafd807
Merge remote-tracking branch 'origin/kris/realtime-donation-flow' int…
krisbitney Jan 4, 2024
b9bbeb5
now using celo token list
krisbitney Jan 4, 2024
cb1e9aa
removed unused import
krisbitney Jan 4, 2024
c4b8201
made dropdown menu scrollable
krisbitney Jan 4, 2024
4e85141
Merge remote-tracking branch 'origin/web3Integrations' into kris/inte…
krisbitney Jan 4, 2024
e24a890
swap works!
krisbitney Jan 5, 2024
2fb34b3
adjustments to reflect uniswap default slippage tolerance
krisbitney Jan 5, 2024
b3ad4e1
fixed jsbi via vite configuration
krisbitney Jan 6, 2024
72e8905
changed priceImpact to number
krisbitney Jan 7, 2024
cf67b5d
removed unused `WalletConnectionProvider` context
krisbitney Jan 8, 2024
f7cfdcf
by request, handleApproveToken is no longer memoized
krisbitney Jan 8, 2024
09dbb70
fixed GD formatting in Donor List
krisbitney Jan 9, 2024
4ee4e32
changed acceptable price impact percent to 5% and moved it to constan…
krisbitney Jan 9, 2024
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
5 changes: 3 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
"@celo-tools/celo-ethers-wrapper": "^0.4.0",
"@ethersproject/shims": "^5.7.0",
"@gooddollar/good-design": "^0.1.31",
"@gooddollar/goodcollective-sdk": "^1.*",
"@gooddollar/goodcollective-sdk": "^1.0.6",
"@gooddollar/web3sdk-v2": "^0.2.2",
"@react-native-aria/interactions": "0.2.3",
"@react-native-async-storage/async-storage": "^1.18.2",
"@react-native-firebase/analytics": "16.7.0",
"@react-native-firebase/app": "16.7.0",
"@superfluid-finance/sdk-core": "^0.3.2",
"@uniswap/router-sdk": "^1.7.1",
"@uniswap/sdk-core": "^4.0.7",
"@uniswap/smart-order-router": "^3.16.23",
"@uniswap/smart-order-router": "^3.20.0",
"@uniswap/v3-sdk": "^3.10.0",
"@usedapp/core": "^1.2.10",
"@wagmi/core": "^1.4.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ interface AproveSwapModalProps {
setOpenModal: any;
}

const AproveSwapModal = ({ openModal, setOpenModal }: AproveSwapModalProps) => {
const ApproveSwapModal = ({ openModal, setOpenModal }: AproveSwapModalProps) => {
return (
<View style={styles.centeredView}>
<Modal animationType="slide" transparent={true} visible={openModal}>
<View style={styles.centeredView}>
<View style={styles.modalView}>
<View style={modalStyles.modalCloseIconWrapper}>
<TouchableOpacity style={modalStyles.modalCloseIcon}>
<TouchableOpacity
style={modalStyles.modalCloseIcon}
onPress={() => {
setOpenModal(false);
}}>
<Image source={CloseIcon} style={styles.closeIcon} />
</TouchableOpacity>
</View>
<Text style={styles.title}>APROVE TOKEN SWAP</Text>
<Text style={styles.title}>APPROVE TOKEN SWAP</Text>
<Text style={styles.paragraph}>
To approve the exchange from your donation currency to this GoodCollective's currency, sign with your
wallet.
Expand Down Expand Up @@ -112,4 +116,4 @@ const styles = StyleSheet.create({
},
});

export default AproveSwapModal;
export default ApproveSwapModal;
1 change: 0 additions & 1 deletion packages/app/src/components/CompleteDonationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const CompleteDonationModal = ({ openModal, setOpenModal }: CompleteDonationModa
style={modalStyles.modalCloseIcon}
onPress={() => {
setOpenModal(false);
console.log(openModal);
}}>
<Image source={CloseIcon} style={styles.closeIcon} />
</TouchableOpacity>
Expand Down
8 changes: 0 additions & 8 deletions packages/app/src/components/ConnectWallet.tsx

This file was deleted.

Loading
Loading