diff --git a/desktop/package.json b/desktop/package.json
index 3a4dab9..b2dbaa1 100644
--- a/desktop/package.json
+++ b/desktop/package.json
@@ -1,6 +1,6 @@
{
"name": "Cryptofolio",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "A cryptocurrency portfolio application.",
"main": "app/server.js",
"scripts": {
diff --git a/mobile/app.json b/mobile/app.json
index 4e07eac..1630cab 100644
--- a/mobile/app.json
+++ b/mobile/app.json
@@ -2,7 +2,7 @@
"expo": {
"name": "Cryptofolio",
"slug": "Cryptofolio",
- "version": "1.0.0",
+ "version": "2.1.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
diff --git a/mobile/package.json b/mobile/package.json
index a0be9a3..03d38a8 100644
--- a/mobile/package.json
+++ b/mobile/package.json
@@ -9,6 +9,7 @@
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.14.1",
+ "@react-native-clipboard/clipboard": "^1.8.2",
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/native": "^5.9.3",
"@react-navigation/stack": "^5.14.3",
diff --git a/mobile/screens/Settings.js b/mobile/screens/Settings.js
index f5827bd..e6b5302 100644
--- a/mobile/screens/Settings.js
+++ b/mobile/screens/Settings.js
@@ -3,6 +3,7 @@ import AsyncStorage from "@react-native-async-storage/async-storage";
import { NavigationActions } from "@react-navigation/native";
import { StatusBar } from "expo-status-bar";
import { Text, TouchableOpacity, View, StyleSheet, ScrollView, Dimensions, Switch, TextInput, Linking, ToastAndroid } from "react-native";
+import Clipboard from "@react-native-clipboard/clipboard";
import DocumentPicker from "react-native-document-picker";
import * as RNFS from "react-native-fs";
import { ThemeContext } from "../utils/theme";
@@ -129,10 +130,59 @@ export default function Settings({ navigation, route }) {
Export Activity
+
+ Donate
+
+ If you'd like to donate, then please feel free to do so, it'd be much appreciated. However, I don't want you to feel obliged to do so, and there are no perks for it. If you decide to donate, please contact me afterwards so I can actually thank you, and I'd love to hear about any ideas you may have for Cryptofolio. If they're within the scope of the project, I'll probably implement them.
+
+
+ { copyAddress("ADA")}}>
+ ADA
+
+ { copyAddress("XMR")}}>
+ XMR
+
+ { copyAddress("ETH")}}>
+ ETH
+
+ { copyAddress("BCH")}}>
+ BCH
+
+ { copyAddress("BTC")}}>
+ BTC
+
+ { copyAddress("LTC")}}>
+ LTC
+
+ { copyAddress("NANO")}}>
+ NANO
+
+ { copyAddress("DOT")}}>
+ DOT
+
+
+
);
+ function copyAddress(address) {
+ let addresses = {
+ ADA: "addr1qyh9ejp2z7drzy8vzpyfeuvzuej5t5tnmjyfpfjn0vt722zqupdg44rqfw9fd8jruaez30fg9fxl34vdnncc33zqwhlqn37lz4",
+ XMR: "49wDQf83p5tHibw9ay6fBvcv48GJynyjVE2V8EX8Vrtt89rPyECRm5zbBqng3udqrYHTjsZStSpnMCa8JRw7cfyGJwMPxDM",
+ ETH: "0x40E1452025d7bFFDfa05d64C2d20Fb87c2b9C0be",
+ BCH: "qrvyd467djuxtw5knjt3d50mqzspcf6phydmyl8ka0",
+ BTC: "bc1qdy5544m2pwpyr6rhzcqwmerczw7e2ytjjc2wvj",
+ LTC: "ltc1qq0ptdjsuvhw6gz9m4huwmhq40gpyljwn5hncxz",
+ NANO: "nano_3ed4ip7cjkzkrzh9crgcdipwkp3h49cudxxz4t8x7pkb8rad7bckqfhzyadg",
+ DOT: "12nGqTQsgEHwkAuHGNXpvzcfgtQkTeo3WCZgwrXLsiqs3KyA"
+ };
+
+ Clipboard.setString(addresses[address]);
+
+ ToastAndroid.showWithGravity("Copied " + address + " address to clipboard.", ToastAndroid.LONG, ToastAndroid.BOTTOM);
+ }
+
async function readData(type) {
DocumentPicker.pick({ type:"text/csv", copyTo:"cachesDirectory" }).then(result => {
RNFS.readFile(result.fileCopyUri, "ascii").then(data => {
@@ -409,6 +459,27 @@ const styles = StyleSheet.create({
paddingBottom:2,
color:globalColors["Light"].accentContrast
},
+ sectionDescriptionWrapper: {
+ alignSelf:"center",
+ backgroundColor:globalColors["Light"].mainThird,
+ borderRadius:globalStyles.borderRadius,
+ width:screenWidth - 120,
+ alignItems:"center",
+ padding:10,
+ marginBottom:10,
+ },
+ sectionDescriptionWrapperDark: {
+ backgroundColor:globalColors["Dark"].mainThird,
+ },
+ sectionDescription: {
+ color:globalColors["Light"].mainContrast,
+ fontSize:16,
+ fontFamily:globalStyles.fontFamily,
+ lineHeight:25,
+ },
+ sectionDescriptionDark: {
+ color:globalColors["Dark"].mainContrast
+ },
inlineButton: {
alignItems:"center",
justifyContent:"center",
diff --git a/mobile/yarn.lock b/mobile/yarn.lock
index 432e79e..3b14245 100644
--- a/mobile/yarn.lock
+++ b/mobile/yarn.lock
@@ -1976,6 +1976,11 @@
dependencies:
deep-assign "^3.0.0"
+"@react-native-clipboard/clipboard@^1.8.2":
+ version "1.8.2"
+ resolved "https://registry.yarnpkg.com/@react-native-clipboard/clipboard/-/clipboard-1.8.2.tgz#454000db103442e830026566e3c2a436e9b3f781"
+ integrity sha512-IMUBqkwS6HyyHX1Dcu/yNqSYsgmI6UGilcUhD+qbH7tVQP8mX3k7hugr5K5IPzpGKaC1VSq4Lt7avy0jomHhLg==
+
"@react-native-community/cli-debugger-ui@^5.0.1-alpha.1":
version "5.0.1-alpha.1"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-5.0.1-alpha.1.tgz#09a856ccd2954cf16eea59b14dd26ae66720e4e6"