Skip to content

Commit

Permalink
Merge pull request #540 from Peersyst/dev
Browse files Browse the repository at this point in the history
v1.2.0
  • Loading branch information
AdriaCarrera authored May 17, 2023
2 parents 7297264 + 5889910 commit d0a4054
Show file tree
Hide file tree
Showing 210 changed files with 4,134 additions and 974 deletions.
1 change: 1 addition & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sonar.exclusions=src/module/api/service/schemas/**
5 changes: 0 additions & 5 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,4 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
web: {
favicon: "./assets/images/favicon.png",
},
extra: {
eas: {
projectId: "b1dac2fd-013a-4e87-a82e-de40c714f416",
},
},
});
3 changes: 2 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ module.exports = function (api) {
},
],
["@babel/plugin-proposal-async-generator-functions"],
"react-native-reanimated/plugin"
"react-native-reanimated/plugin",
"transform-inline-environment-variables"
],
};
};
30 changes: 2 additions & 28 deletions eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,7 @@
"node": "18.15.0",
"env": {
"BUILD_NUMBER": "__BUILD_NUMBER__",
"REACT_APP_ENV_CONFIG": "staging",
"MINIMUM_TRANSACTION_AMOUNT": "61",
"MAINNET_EXPLORER_LINK": "https://explorer.nervos.org/",
"TESTNET_EXPLORER_LINK": "https://pudge.explorer.nervos.org/",
"CKB_TESTNET_URL": "https://ckb-node-test-1.peersyst.com/rpc",
"INDEXER_TESTNET_URL": "https://ckb-node-test-1.peersyst.com/indexer",
"CKB_MAINNET_URL": "https://ckb-node-mainnet.peersyst.com/rpc",
"INDEXER_MAINNET_URL": "https://ckb-node-mainnet.peersyst.com/indexer",
"MINIMUM_DAO_DEPOSIT": "102",
"MAX_NUMBER_OF_DECIMALS": "6",
"FAUCET_URL": "https://faucet.nervos.org/",
"MAINNET_EXPLORER_API": "https://mainnet-api.explorer.nervos.org/api/v1/",
"TESTNET_EXPLORER_API": "https://testnet-api.explorer.nervos.org/api/v1/",
"ENABLE_MAINNET": "true"
"CONFIG_ENV": "staging"
},
"android": {
"buildType": "apk"
Expand All @@ -33,20 +20,7 @@
"node": "18.15.0",
"env": {
"BUILD_NUMBER": "__BUILD_NUMBER__",
"REACT_APP_ENV_CONFIG": "production",
"MINIMUM_TRANSACTION_AMOUNT": "61",
"MAINNET_EXPLORER_LINK": "https://explorer.nervos.org/",
"TESTNET_EXPLORER_LINK": "https://pudge.explorer.nervos.org/",
"CKB_TESTNET_URL": "https://ckb-node-test-1.peersyst.com/rpc",
"INDEXER_TESTNET_URL": "https://ckb-node-test-1.peersyst.com/indexer",
"CKB_MAINNET_URL": "https://ckb-node-mainnet.peersyst.com/rpc",
"INDEXER_MAINNET_URL": "https://ckb-node-mainnet.peersyst.com/indexer",
"MINIMUM_DAO_DEPOSIT": "102",
"MAX_NUMBER_OF_DECIMALS": "6",
"FAUCET_URL": "https://faucet.nervos.org/",
"MAINNET_EXPLORER_API": "https://mainnet-api.explorer.nervos.org/api/v1/",
"TESTNET_EXPLORER_API": "https://testnet-api.explorer.nervos.org/api/v1/",
"ENABLE_MAINNET": "true"
"CONFIG_ENV": "production"
},
"android": {}
}
Expand Down
246 changes: 1 addition & 245 deletions openapi-spec.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"dependencies": {
"@ckb-lumos/lumos": "^0.18.0-rc6",
"@expo/config-plugins": "^5.0.2",
"@peersyst/react-hooks": "^2.2.5",
"@peersyst/react-native-components": "^2.3.1",
"@peersyst/react-hooks": "^2.2.7",
"@peersyst/react-native-components": "^2.5.0",
"@peersyst/react-native-styled": "^2.1.2",
"@peersyst/react-types": "^1.5.2",
"@peersyst/react-types": "^1.5.5",
"@peersyst/react-utils": "^2.2.4",
"@rather-labs/nrc-721-sdk": "0.0.16",
"@react-native-async-storage/async-storage": "~1.17.11",
Expand Down Expand Up @@ -104,6 +104,7 @@
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
Expand All @@ -126,6 +127,7 @@
"react-native-pager-view": "6.0.0",
"react-native-svg": "13.4.0",
"react-native-gesture-handler": "2.9.0",
"react-native-reanimated": "~2.12.0"
"react-native-reanimated": "~2.12.0",
"immutable": "4.0.0-rc.12"
}
}
3 changes: 3 additions & 0 deletions src/asset/icon/ExternalLink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/config/config.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
"newsRSSUrl": "https://fetchrss.com/rss/6239aa2ceb62c371b8448ee26239aa120841546894777912.xml",
"defaultDecimals": 8,
"miniUnits": "CKS",
"enableSignerApp": false
"enableSignerApp": false,
"signerUrl": "",
"defaultDAppImage": "https://dev-xrp-studio.s3.eu-west-1.amazonaws.com/9ef33ba0-d96c-46b9-aba7-18d523affced.png"
}
5 changes: 5 additions & 0 deletions src/config/config.declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ declare module "@peersyst/react-native-components" {
defaultDecimals: number;
miniUnits: string;
enableSignerApp: boolean;
/* signerUrl: url of CKBull Developer Console, if you're running this in a local envirorment add your IP as host. p.e. http://192.168.1.2:3001 */
signerUrl: string;
defaultDAppImage: string;
}

export interface CreateConfig {
Expand All @@ -49,6 +52,8 @@ declare module "@peersyst/react-native-components" {
defaultDecimals: number;
miniUnits: string;
enableSignerApp: boolean;
signerUrl: string;
defaultDAppImage: string;
}

export interface ExtraValidators {
Expand Down
3 changes: 2 additions & 1 deletion src/config/config.dev.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"enableMainnet": true,
"enableSignerApp": true
"enableSignerApp": true,
"signerUrl": "http://172.20.10.10:3001"
}
4 changes: 3 additions & 1 deletion src/config/config.prod.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"enableMainnet": true
"enableMainnet": true,
"enableSignerApp": true,
"signerUrl": "https://console.ckbull.app"
}
4 changes: 3 additions & 1 deletion src/config/config.staging.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"enableMainnet": true
"enableMainnet": true,
"enableSignerApp": true,
"signerUrl": "https://ckbull-developer-panel.peersyst.tech"
}
3 changes: 1 addition & 2 deletions src/config/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ const envConfigs: Record<string, CreateConfig> = {
staging: { ...baseConfig, ...stagingConfig },
};

const environment = process.env;
const envKey = environment.REACT_APP_ENV_CONFIG || environment.NODE_ENV!;
const envKey = process.env.CONFIG_ENV || process.env.NODE_ENV!;

if (!(envKey in envConfigs)) throw new Error(`${envKey} is not a valid env config`);

Expand Down
10 changes: 10 additions & 0 deletions src/config/theme/theme.declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ declare module "@peersyst/react-native-components" {
body4Regular: true;
body4Light: true;
}

export interface ButtonVariantOverrides {
primary: true;
secondary: true;
tertiary: true;
outlined: true;
text: true;
glass: true;
filled: false;
}
}

// Type styled components theme with our components theme
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { StatusBar, Suspense } from "@peersyst/react-native-components";
import { useRecoilValue } from "recoil";
import settingsState from "module/settings/state/SettingsState";
import { Platform, UIManager } from "react-native";
import "module/api/OpenApiConfig";

if (typeof BigInt === "undefined") global.BigInt = require("big-integer");

Expand Down
26 changes: 24 additions & 2 deletions src/locale/locales/el/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
"pending": "Εν εξελίξει",
"signed": "Υπογεγραμμένο",
"expired": "Ληγμένο",
"expireDate": "Ληγει σε {{hours}}h {{minutes}}min {{seconds}}s",
"connected": "Συνδεδεμένο",
"failed": "Αποτυχημένη",
"proposed": "Προτεινόμενη",
Expand Down Expand Up @@ -198,5 +197,28 @@
"start_making_transactions": "Για να ξεκινήσετε να χρησιμοποιείτε το CKBull, στείλτε CKB, Tokens ή NFT στη διεύθυνση του πορτοφολιού σας και απελευθερώστε τη δύναμη του Nervos Network.",
"start_creating_deposits": "Για να δημιουργήσετε την πρώτη σας κατάθεση, στείλτε CKB στο DAO Nervos και αρχίστε να κερδίζετε ανταμοιβές.",
"withdraw_explanation": "Να θυμάστε ότι κάθε περίοδος κατάθεσης διαρκεί 180 Epochs (~30 ημέρες) από την ημερομηνία της κατάθεσής σας.",
"epochs": "Εποχές"
"epochs": "Εποχές",
"noConnectedSites": "Δεν υπάρχουν συνδεδεμένες ιστοσελίδες",
"rejectConnection": "Reject the connection",
"confirmConnectionWith": "Confirm connection with",
"signWith": "Sign with",
"confirmTransaction": "Confirm transaction",
"transaction": "transaction",
"seeInExplorer": "See in explorer",
"signTransactionRequest": "Sign transaction request",
"signedSuccess": "Signed!",
"rejectTransaction": "Reject transaction",
"rejectTransactionDescription": "Are you sure you want to reject this transaction? This action cannot be undone.",
"rejectConnectionDescription": "Are you sure you want to reject this connection? This action cannot be undone.",
"reject": "Reject",
"rejectTransactionRequestSuccess": "Transaction request rejected successfully!",
"noPendingTransactionRequests": "There are no pending transactions",
"copied": "Copied!",
"noSignedTransactions": "There are no signed transactions",
"signInRequestSuccess": "Logged in successfully!",
"reviewConnection": "Review connection",
"expiresAt": "Expires at {{date}}",
"signInRequest": "Sign in request",
"disconnectDAppConfirmation": "By disconnecting your account, you will no longer be able to use this dApp.",
"dAppDisconnected": "dApp disconnected!"
}
5 changes: 4 additions & 1 deletion src/locale/locales/el/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"no_nfts": "Δεν υπάρχουν ακόμη NFT",
"no_tokens": "Δεν υπάρχουν token",
"no_deposits": "Δεν υπάρχουν καταθέσεις",
"no_withdrawals": "Δεν υπάρχουν αναλήψεις"
"no_withdrawals": "Δεν υπάρχουν αναλήψεις",
"sign_in_request_already_signed": "Sign In request already signed",
"transaction_request_already_signed": "Transaction request already signed",
"transaction_request_already_declined": "Transaction request already declined"
}
26 changes: 24 additions & 2 deletions src/locale/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
"pending": "Pending",
"signed": "Signed",
"expired": "Expired",
"expireDate": "Expires in {{hours}}h {{minutes}}min {{seconds}}s",
"connected": "Connected",
"failed": "Failed",
"proposed": "Proposed",
Expand Down Expand Up @@ -198,5 +197,28 @@
"start_making_transactions": "To start using CKBull, send CKBs, tokens or NFTs to your wallet address and unleash the power of the Nervos network.",
"start_creating_deposits": "To create your first deposit send some CKB to the Nervos DAO and start eraning rewards.",
"withdraw_explanation": "Remember that each deposit period is 180 epochs (~30 days) starting from the time of your deposit.",
"epochs": "Epochs"
"epochs": "Epochs",
"noConnectedSites": "No connected sites",
"rejectConnection": "Reject the connection",
"confirmConnectionWith": "Confirm connection with",
"signWith": "Sign with",
"confirmTransaction": "Confirm transaction",
"transaction": "transaction",
"seeInExplorer": "See in explorer",
"signTransactionRequest": "Sign transaction request",
"signedSuccess": "Signed!",
"rejectTransaction": "Reject transaction",
"rejectTransactionDescription": "Are you sure you want to reject this transaction? This action cannot be undone.",
"rejectConnectionDescription": "Are you sure you want to reject this connection? This action cannot be undone.",
"reject": "Reject",
"rejectTransactionRequestSuccess": "Transaction request rejected successfully!",
"noPendingTransactionRequests": "There are no pending transactions",
"copied": "Copied!",
"noSignedTransactions": "There are no signed transactions",
"signInRequestSuccess": "Logged in successfully!",
"reviewConnection": "Review connection",
"expiresAt": "Expires at {{date}}",
"signInRequest": "Sign in request",
"disconnectDAppConfirmation": "By disconnecting your account, you will no longer be able to use this dApp.",
"dAppDisconnected": "dApp disconnected!"
}
5 changes: 4 additions & 1 deletion src/locale/locales/en/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"no_nfts": "There's no NFTs yet",
"no_tokens": "There's no tokens yet",
"no_deposits": "Without deposits",
"no_withdrawals": "Without withdrawals"
"no_withdrawals": "Without withdrawals",
"sign_in_request_already_signed": "Sign In request already signed",
"transaction_request_already_signed": "Transaction request already signed",
"transaction_request_already_declined": "Transaction request already declined"
}
26 changes: 24 additions & 2 deletions src/locale/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
"pending": "Pendiente",
"signed": "Firmada",
"expired": "Expirada",
"expireDate": "Expira en {{hours}}h {{minutes}}min {{seconds}}s",
"connected": "Conectado",
"failed": "Fallado",
"proposed": "Propuesta",
Expand Down Expand Up @@ -198,5 +197,28 @@
"start_making_transactions": "Para empezar a utilizar CKBull, envíe CKBs, tokens o NFTs a la dirección de su wallet y destapa el poder de la red Nervos.",
"start_creating_deposits": "Para crear tu primer depósito envía algunos CKB a la DAO de Nervos y empieza a recibir recompensas.",
"withdraw_explanation": "Recuerde que cada periodo de depósito es de 180 epochs (~30 días) a partir del momento de su depósito.",
"epochs": "Epochs"
"epochs": "Epochs",
"noConnectedSites": "No hay sitios conectados",
"rejectConnection": "Rechaza la conexión",
"confirmConnectionWith": "Confirmar conexión con",
"signWith": "Firma con",
"confirmTransaction": "Confirma la transacción",
"transaction": "transacción",
"seeInExplorer": "Ver en Explorer",
"signTransactionRequest": "Firmar petición de transacción",
"signedSuccess": "Firmado!",
"rejectTransaction": "Rechazar transacción",
"rejectTransactionDescription": "Estás seguro de querer rechazar la transacción? Esta acción no puede deshacerse.",
"rejectConnectionDescription": "Estás seguro de querer rechazar la transacción? Esta acción no puede deshacerse.",
"reject": "Rechazar",
"rejectTransactionRequestSuccess": "Petición de transacción rechazada correctamente!",
"noPendingTransactionRequests": "No tienes transacciones pendientes",
"copied": "Copiado!",
"noSignedTransactions": "No tienes transacciones firmadas",
"signInRequestSuccess": "Inicio de sessión satisfactorio!",
"reviewConnection": "Revisar conexión",
"expiresAt": "Expira {{date}}",
"signInRequest": "Petición de inicio de sessión",
"disconnectDAppConfirmation": "Al desconectar tu cuenta, no podrás usarla para interactuar con esta DApp. ¿Estás seguro de que quieres desconectarla?",
"dAppDisconnected": "DApp desconectada!"
}
5 changes: 4 additions & 1 deletion src/locale/locales/es/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"no_nfts": "No hay NFTs",
"no_tokens": "No hay tokens",
"no_deposits": "Sin depósitos",
"no_withdrawals": "Sin retiros"
"no_withdrawals": "Sin retiros",
"sign_in_request_already_signed": "Petición de inicio de sesión ya firmada",
"transaction_request_already_signed": "Petición de transacción ya firmada",
"transaction_request_already_declined": "Petición de transacción ya rechazada"
}
26 changes: 24 additions & 2 deletions src/locale/locales/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
"pending": "En attente",
"signed": "Signé",
"expired": "Expiré",
"expireDate": "Expire dans {{hours}}h {{minutes}}min {{seconds}}s",
"connected": "Connecté",
"failed": "Échoué",
"proposed": "Proposé",
Expand Down Expand Up @@ -198,5 +197,28 @@
"start_making_transactions": "Pour commencer à utiliser CKBull, envoyez des CKBs, des jetons ou des NFTs à l'adresse de votre portefeuille et libérez la puissance de Nervos Network.",
"start_creating_deposits": "Pour créer votre premier dépôt, envoyez des CKBs au DAO Nervos et commencez à gagner des récompenses.",
"withdraw_explanation": "N'oubliez pas que chaque période de dépôt dure 180 Epochs (~ 30 jours) à partir de la date de votre dépôt.",
"epochs": "Epochs"
"epochs": "Epochs",
"noConnectedSites": "Aucun site connecté",
"rejectConnection": "Reject the connection",
"confirmConnectionWith": "Confirm connection with",
"signWith": "Sign with",
"confirmTransaction": "Confirm transaction",
"transaction": "transaction",
"seeInExplorer": "See in explorer",
"signTransactionRequest": "Sign transaction request",
"signedSuccess": "Signed!",
"rejectTransaction": "Reject transaction",
"rejectTransactionDescription": "Are you sure you want to reject this transaction? This action cannot be undone.",
"rejectConnectionDescription": "Are you sure you want to reject this connection? This action cannot be undone.",
"reject": "Reject",
"rejectTransactionRequestSuccess": "Transaction request rejected successfully!",
"noPendingTransactionRequests": "There are no pending transactions",
"copied": "Copied!",
"noSignedTransactions": "There are no signed transactions",
"signInRequestSuccess": "Logged in successfully!",
"reviewConnection": "Review connection",
"expiresAt": "Expires at {{date}}",
"signInRequest": "Sign in request",
"disconnectDAppConfirmation": "By disconnecting your account, you will no longer be able to use this dApp.",
"dAppDisconnected": "dApp disconnected!"
}
5 changes: 4 additions & 1 deletion src/locale/locales/fr/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"no_nfts": "Il n'y a pas encore de NFTs",
"no_tokens": "Il n'y a pas encore de jetons",
"no_deposits": "Sans dépôts",
"no_withdrawals": "Sans retraits"
"no_withdrawals": "Sans retraits",
"sign_in_request_already_signed": "Sign In request already signed",
"transaction_request_already_signed": "Transaction request already signed",
"transaction_request_already_declined": "Transaction request already declined"
}
Loading

0 comments on commit d0a4054

Please sign in to comment.