-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
7,710 additions
and
1,070 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
--cache-location/_logs/2025-02-27T19_26_00_034Z-debug-0.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
0 verbose cli /Users/rustam/.nvm/versions/node/v20.15.1/bin/node /Users/rustam/.nvm/versions/node/v20.15.1/bin/npm | ||
1 info using npm@10.7.0 | ||
2 info using node@v20.15.1 | ||
3 silly config:load:file:/Users/rustam/.nvm/versions/node/v20.15.1/lib/node_modules/npm/npmrc | ||
4 silly config:load:file:/Users/rustam/workspace/onramp/onramp-demo-mobile/.npmrc | ||
5 silly config:load:file:/Users/rustam/.npmrc | ||
6 silly config:load:file:/Users/rustam/.nvm/versions/node/v20.15.1/etc/npmrc | ||
7 verbose title npm run lint node_modules/.cache/eslint/ | ||
8 verbose argv "run" "lint" "--cache" "--cache-location" "node_modules/.cache/eslint/" | ||
9 verbose logfile logs-max:10 dir:/Users/rustam/workspace/onramp/onramp-demo-mobile/--cache-location/_logs/2025-02-27T19_26_00_034Z- | ||
10 verbose logfile /Users/rustam/workspace/onramp/onramp-demo-mobile/--cache-location/_logs/2025-02-27T19_26_00_034Z-debug-0.log | ||
11 silly logfile done cleaning log files | ||
12 http fetch GET 200 https://registry.npmjs.org/npm 226ms | ||
13 notice | ||
13 notice New [31mmajor[39m version of npm available! [31m10.7.0[39m -> [34m11.1.0[39m | ||
13 notice Changelog: [34mhttps://github.com/npm/cli/releases/tag/v11.1.0[39m | ||
13 notice To update run: [4mnpm install -g npm@11.1.0[24m | ||
13 notice { force: true, [Symbol(proc-log.meta)]: true } | ||
14 verbose exit 1 | ||
15 verbose code 1 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
extends: [ | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
], | ||
plugins: ["react", "react-hooks", "react-native", "@typescript-eslint"], | ||
rules: { | ||
"react-native/no-unused-styles": 2, | ||
"react-native/split-platform-components": 2, | ||
"react-native/no-inline-styles": 2, | ||
"react-native/no-color-literals": 2, | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "error", | ||
}, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact" | ||
], | ||
"editor.formatOnSave": true, | ||
"eslint.enable": true, | ||
"eslint.run": "onType" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,56 @@ | ||
import { FundForm } from "@/components/FundForm/FundForm"; | ||
import ParallaxScrollView from "@/components/ParallaxScrollView"; | ||
import { ThemedText } from "@/components/ThemedText"; | ||
import { ThemedView } from "@/components/ThemedView"; | ||
import { WalletDetails } from "@/components/WalletDetails/WalletDetails"; | ||
import { CURRENCY_OPTIONS } from "@/constants/constants"; | ||
import { useApp } from "@/context/AppContext"; | ||
import { useWallet } from "@/hooks/useWallet"; | ||
import { useState } from "react"; | ||
import { useMemo } from "react"; | ||
import { | ||
Image, | ||
KeyboardAvoidingView, | ||
Platform, | ||
ScrollView, | ||
StyleSheet, | ||
} from "react-native"; | ||
import { useSafeAreaInsets } from "react-native-safe-area-context"; | ||
|
||
export default function HomeScreen() { | ||
const [currency, setCurrency] = useState("USD"); | ||
const [amount, setAmount] = useState("0"); | ||
const [asset, setAsset] = useState("ETH"); | ||
const [network, setNetwork] = useState("base"); | ||
const { currency, network } = useApp(); | ||
|
||
const currentWallet = useWallet({ network }); | ||
const insets = useSafeAreaInsets(); | ||
const currentWallet = useWallet({ network: network?.name || "base" }); | ||
|
||
const currencySymbol = useMemo( | ||
() => | ||
CURRENCY_OPTIONS.find((option) => option.value === currency?.id)?.symbol, | ||
[currency] | ||
); | ||
|
||
return ( | ||
<KeyboardAvoidingView | ||
behavior={Platform.OS === "ios" ? "padding" : "height"} | ||
style={{ flex: 1 }} | ||
> | ||
<ParallaxScrollView | ||
headerBackgroundColor={{ light: "blue", dark: "#1D3D47" }} | ||
headerImage={ | ||
<Image | ||
source={require("@/assets/images/onramp-logo.png")} | ||
style={styles.reactLogo} | ||
/> | ||
} | ||
<ThemedView style={{ flex: 1 }}> | ||
<KeyboardAvoidingView | ||
behavior={Platform.OS === "ios" ? "padding" : "height"} | ||
style={{ flex: 1, paddingTop: insets.top }} | ||
> | ||
<ThemedView style={styles.container}> | ||
<ThemedText type="title">Coinbase Onramp Demo</ThemedText> | ||
|
||
<WalletDetails | ||
network={network} | ||
address={currentWallet?.address} | ||
onChangeNetwork={setNetwork} | ||
/> | ||
|
||
<FundForm | ||
currency={currency} | ||
amount={amount} | ||
asset={asset} | ||
onChangeCurrency={setCurrency} | ||
onChangeAmount={setAmount} | ||
onChangeAsset={setAsset} | ||
walletAddress={currentWallet?.address || ""} | ||
walletChain={network} | ||
/> | ||
</ThemedView> | ||
</ParallaxScrollView> | ||
</KeyboardAvoidingView> | ||
<ThemedText type="subtitle" style={{ textAlign: "center" }}> | ||
Coinbase Onramp demo | ||
</ThemedText> | ||
<ScrollView | ||
style={styles.scroll} | ||
contentContainerStyle={[styles.scrollContent]} | ||
> | ||
<FundForm walletAddress={currentWallet?.address || ""} /> | ||
</ScrollView> | ||
</KeyboardAvoidingView> | ||
</ThemedView> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
scroll: { | ||
flex: 1, | ||
gap: 10, | ||
}, | ||
reactLogo: { | ||
height: 200, | ||
width: 300, | ||
bottom: 0, | ||
left: 0, | ||
position: "absolute", | ||
alignSelf: "center", | ||
scrollContent: { | ||
gap: 24, | ||
padding: 16, | ||
}, | ||
}); |
Oops, something went wrong.