diff --git a/__mocks__/dataMocks/mockAddresses.ts b/__mocks__/dataMocks/mockAddresses.ts
index 187b16793..edabd33a4 100644
--- a/__mocks__/dataMocks/mockAddresses.ts
+++ b/__mocks__/dataMocks/mockAddresses.ts
@@ -5,21 +5,18 @@ export const mockAddresses: AddressClass[] = [
uaAddress: 'UA-12345678901234567890',
address: 'UA-12345678901234567890',
addressKind: AddressKindEnum.u,
- containsPending: false,
receivers: ReceiverEnum.o + ReceiverEnum.z + ReceiverEnum.t,
},
{
uaAddress: 'UA-12345678901234567890',
address: 'sapling-12345678901234567890',
addressKind: AddressKindEnum.z,
- containsPending: false,
receivers: ReceiverEnum.z,
},
{
uaAddress: 'UA-12345678901234567890',
address: 'transparent-12345678901234567890',
addressKind: AddressKindEnum.t,
- containsPending: false,
receivers: ReceiverEnum.t,
},
];
diff --git a/__tests__/Send.snapshot.tsx b/__tests__/Send.snapshot.tsx
index fef504880..9b4c31408 100644
--- a/__tests__/Send.snapshot.tsx
+++ b/__tests__/Send.snapshot.tsx
@@ -100,6 +100,8 @@ describe('Component Send - test', () => {
setScrollToTop={onFunction}
setScrollToBottom={onFunction}
setServerOption={onFunction}
+ clearTimers={onFunction}
+ configure={onFunction}
/>
,
);
@@ -130,6 +132,8 @@ describe('Component Send - test', () => {
setScrollToTop={onFunction}
setScrollToBottom={onFunction}
setServerOption={onFunction}
+ clearTimers={onFunction}
+ configure={onFunction}
/>
,
);
diff --git a/__tests__/__snapshots__/Header.snapshot.tsx.snap b/__tests__/__snapshots__/Header.snapshot.tsx.snap
index 80ed7e9a9..feaa36073 100644
--- a/__tests__/__snapshots__/Header.snapshot.tsx.snap
+++ b/__tests__/__snapshots__/Header.snapshot.tsx.snap
@@ -32,139 +32,71 @@ exports[`Component Header - test Header Complex - snapshot 1`] = `
style={
{
"alignItems": "center",
- "borderColor": undefined,
- "borderRadius": 10,
- "borderWidth": 1,
"justifyContent": "center",
"margin": 0,
"marginRight": 5,
"minHeight": 25,
"minWidth": 25,
- "padding": 1,
+ "padding": 0,
}
}
>
-
- <
- icon={
- {
- "icon": [
- 640,
- 512,
- [
- "wifi-3",
- "wifi-strong",
- ],
- "f1eb",
- "M54.2 202.9C123.2 136.7 216.8 96 320 96s196.8 40.7 265.8 106.9c12.8 12.2 33 11.8 45.2-.9s11.8-33-.9-45.2C549.7 79.5 440.4 32 320 32S90.3 79.5 9.8 156.7C-2.9 169-3.3 189.2 8.9 202s32.5 13.2 45.2 .9zM320 256c56.8 0 108.6 21.1 148.2 56c13.3 11.7 33.5 10.4 45.2-2.8s10.4-33.5-2.8-45.2C459.8 219.2 393 192 320 192s-139.8 27.2-190.5 72c-13.3 11.7-14.5 31.9-2.8 45.2s31.9 14.5 45.2 2.8c39.5-34.9 91.3-56 148.2-56zm64 160a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z",
+ "icon": [
+ 640,
+ 512,
+ [
+ 62337,
+ "cloud-download",
+ "cloud-download-alt",
],
- "iconName": "wifi",
- "prefix": "fas",
- }
- }
- size={18}
- />
-
-
-
-
- <
- color="red"
- icon={
- {
- "icon": [
- 640,
- 512,
- [
- 62337,
- "cloud-download",
- "cloud-download-alt",
+ "f0ed",
+ "M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z",
],
- "f0ed",
- "M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z",
- ],
- "iconName": "cloud-arrow-down",
- "prefix": "fas",
+ "iconName": "cloud-arrow-down",
+ "prefix": "fas",
+ }
}
- }
- size={20}
- />
+ size={20}
+ />
+
-
- <
- color="#5a8c5a"
- icon={
- {
- "icon": [
- 640,
- 512,
- [
- "wifi-3",
- "wifi-strong",
- ],
- "f1eb",
- "M54.2 202.9C123.2 136.7 216.8 96 320 96s196.8 40.7 265.8 106.9c12.8 12.2 33 11.8 45.2-.9s11.8-33-.9-45.2C549.7 79.5 440.4 32 320 32S90.3 79.5 9.8 156.7C-2.9 169-3.3 189.2 8.9 202s32.5 13.2 45.2 .9zM320 256c56.8 0 108.6 21.1 148.2 56c13.3 11.7 33.5 10.4 45.2-2.8s10.4-33.5-2.8-45.2C459.8 219.2 393 192 320 192s-139.8 27.2-190.5 72c-13.3 11.7-14.5 31.9-2.8 45.2s31.9 14.5 45.2 2.8c39.5-34.9 91.3-56 148.2-56zm64 160a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z",
+ "icon": [
+ 640,
+ 512,
+ [
+ 62337,
+ "cloud-download",
+ "cloud-download-alt",
],
- "iconName": "wifi",
- "prefix": "fas",
- }
- }
- size={18}
- />
-
-
-
-
- <
- color="red"
- icon={
- {
- "icon": [
- 640,
- 512,
- [
- 62337,
- "cloud-download",
- "cloud-download-alt",
+ "f0ed",
+ "M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z",
],
- "f0ed",
- "M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z",
- ],
- "iconName": "cloud-arrow-down",
- "prefix": "fas",
+ "iconName": "cloud-arrow-down",
+ "prefix": "fas",
+ }
}
- }
- size={20}
- />
+ size={20}
+ />
+
+ >
+
+ <
+ color="red"
+ icon={
+ {
+ "icon": [
+ 640,
+ 512,
+ [
+ 62337,
+ "cloud-download",
+ "cloud-download-alt",
+ ],
+ "f0ed",
+ "M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z",
+ ],
+ "iconName": "cloud-arrow-down",
+ "prefix": "fas",
+ }
+ }
+ size={20}
+ />
+
+
-
- <
- color="#5a8c5a"
- icon={
- {
- "icon": [
- 640,
- 512,
- [
- "wifi-3",
- "wifi-strong",
- ],
- "f1eb",
- "M54.2 202.9C123.2 136.7 216.8 96 320 96s196.8 40.7 265.8 106.9c12.8 12.2 33 11.8 45.2-.9s11.8-33-.9-45.2C549.7 79.5 440.4 32 320 32S90.3 79.5 9.8 156.7C-2.9 169-3.3 189.2 8.9 202s32.5 13.2 45.2 .9zM320 256c56.8 0 108.6 21.1 148.2 56c13.3 11.7 33.5 10.4 45.2-2.8s10.4-33.5-2.8-45.2C459.8 219.2 393 192 320 192s-139.8 27.2-190.5 72c-13.3 11.7-14.5 31.9-2.8 45.2s31.9 14.5 45.2 2.8c39.5-34.9 91.3-56 148.2-56zm64 160a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z",
+ "icon": [
+ 640,
+ 512,
+ [
+ 62337,
+ "cloud-download",
+ "cloud-download-alt",
],
- "iconName": "wifi",
- "prefix": "fas",
- }
- }
- size={18}
- />
-
-
-
-
- <
- color="red"
- icon={
- {
- "icon": [
- 640,
- 512,
- [
- 62337,
- "cloud-download",
- "cloud-download-alt",
+ "f0ed",
+ "M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z",
],
- "f0ed",
- "M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z",
- ],
- "iconName": "cloud-arrow-down",
- "prefix": "fas",
+ "iconName": "cloud-arrow-down",
+ "prefix": "fas",
+ }
}
- }
- size={20}
- />
+ size={20}
+ />
+
+ >
+
+ <
+ color="red"
+ icon={
+ {
+ "icon": [
+ 640,
+ 512,
+ [
+ 62337,
+ "cloud-download",
+ "cloud-download-alt",
+ ],
+ "f0ed",
+ "M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z",
+ ],
+ "iconName": "cloud-arrow-down",
+ "prefix": "fas",
+ }
+ }
+ size={20}
+ />
+
+
+
+
+
+ <
+ color="rgb(216, 216, 216)"
+ icon={
+ {
+ "icon": [
+ 512,
+ 512,
+ [
+ 128308,
+ 128309,
+ 128992,
+ 128993,
+ 128994,
+ 128995,
+ 128996,
+ 9679,
+ 9898,
+ 9899,
+ 11044,
+ 61708,
+ 61915,
+ ],
+ "f111",
+ "M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z",
+ ],
+ "iconName": "circle",
+ "prefix": "far",
+ }
+ }
+ size={20}
+ />
+
+ text translated
+
+
+
+
+
+
+ text translated
+
+
{
- //console.log('LOADED', 'prior', this.state.appState, 'next', nextAppState);
+ //console.log('LOADED', 'prior', this.state.appStateStatus, 'next', nextAppState);
+ // let's catch the prior value
+ const priorAppState = this.state.appStateStatus;
if (Platform.OS === GlobalConst.platformOSios) {
if (
- (this.state.appStateStatus === AppStateStatusEnum.inactive && nextAppState === AppStateStatusEnum.active) ||
- (this.state.appStateStatus === AppStateStatusEnum.active && nextAppState === AppStateStatusEnum.inactive)
+ (priorAppState === AppStateStatusEnum.inactive && nextAppState === AppStateStatusEnum.active) ||
+ (priorAppState === AppStateStatusEnum.active && nextAppState === AppStateStatusEnum.inactive)
) {
//console.log('LOADED SAVED IOS do nothing', nextAppState);
this.setState({ appStateStatus: nextAppState });
return;
}
- if (
- this.state.appStateStatus === AppStateStatusEnum.inactive &&
- nextAppState === AppStateStatusEnum.background
- ) {
+ if (priorAppState === AppStateStatusEnum.inactive && nextAppState === AppStateStatusEnum.background) {
//console.log('App LOADED IOS is gone to the background!');
+ this.setState({ appStateStatus: nextAppState });
// re-activate the interruption sync flag
await RPC.rpcSetInterruptSyncAfterBatch(GlobalConst.true);
// setting value for background task Android
@@ -514,13 +517,17 @@ export class LoadedAppClass extends Component => {
+ setServerOption = async (
+ value: ServerType,
+ selectServer: SelectServerEnum,
+ toast: boolean,
+ sameServerChainName: boolean,
+ ): Promise => {
// here I know the server was changed, clean all the tasks before anything.
await this.rpc.clearTimers();
this.setSyncingStatus(new SyncingStatusClass());
@@ -1185,7 +1198,7 @@ export class LoadedAppClass extends Component {
+ await this.rpc.clearTimers();
+ };
+
+ configure = async () => {
+ await this.rpc.configure();
+ };
+
onClickOKChangeWallet = async (state: any) => {
const { server } = this.state;
@@ -1390,8 +1415,10 @@ export class LoadedAppClass extends Component {
- if (this.state.newServer) {
+ if (this.state.newServer && this.state.newSelectServer) {
const beforeServer = this.state.server;
- const resultStr: string = await RPCModule.execute(CommandEnum.changeserver, this.state.newServer.uri);
- if (resultStr.toLowerCase().startsWith(GlobalConst.error)) {
+
+ const resultStrServerPromise = RPCModule.execute(CommandEnum.changeserver, this.state.newServer.uri);
+ const timeoutServerPromise = new Promise((_, reject) => {
+ setTimeout(() => {
+ reject(new Error('Promise changeserver Timeout 30 seconds'));
+ }, 30000);
+ });
+
+ const resultStrServer: string = await Promise.race([resultStrServerPromise, timeoutServerPromise]);
+ //console.log(resultStrServer);
+
+ if (!resultStrServer || resultStrServer.toLowerCase().startsWith(GlobalConst.error)) {
//console.log(`Error change server ${value} - ${resultStr}`);
this.addLastSnackbar({
- message: `${this.state.translate('loadedapp.changeservernew-error')} ${resultStr}`,
+ message: `${this.state.translate('loadedapp.changeservernew-error')} ${resultStrServer}`,
});
return;
} else {
@@ -1457,9 +1494,12 @@ export class LoadedAppClass extends Component
{!readOnly &&
+ selectServer !== SelectServerEnum.offline &&
(mode === ModeEnum.advanced ||
(!!totalBalance && totalBalance.spendableOrchard + totalBalance.spendablePrivate > 0) ||
(!!totalBalance &&
@@ -2015,6 +2057,8 @@ export class LoadedAppClass extends Component
)}
diff --git a/app/LoadedApp/components/Menu.tsx b/app/LoadedApp/components/Menu.tsx
index 2d797be9b..d3089c00d 100644
--- a/app/LoadedApp/components/Menu.tsx
+++ b/app/LoadedApp/components/Menu.tsx
@@ -13,7 +13,7 @@ import moment from 'moment';
import 'moment/locale/es';
import 'moment/locale/pt';
import 'moment/locale/ru';
-import { GlobalConst, MenuItemEnum, ModeEnum } from '../../AppState';
+import { GlobalConst, MenuItemEnum, ModeEnum, SelectServerEnum } from '../../AppState';
type MenuProps = {
onItemSelected: (item: MenuItemEnum) => Promise;
@@ -22,7 +22,18 @@ type MenuProps = {
const Menu: React.FunctionComponent = ({ onItemSelected, updateMenuState }) => {
const context = useContext(ContextAppLoaded);
- const { translate, readOnly, mode, valueTransfers, addLastSnackbar, security, language, rescanMenu } = context;
+ const {
+ translate,
+ readOnly,
+ mode,
+ valueTransfers,
+ addLastSnackbar,
+ security,
+ language,
+ rescanMenu,
+ selectServer,
+ netInfo,
+ } = context;
const { colors } = useTheme() as unknown as ThemeType;
moment.locale(language);
@@ -89,7 +100,7 @@ const Menu: React.FunctionComponent = ({ onItemSelected, updateMenuSt
{translate('loadedapp.about') as string}
- {mode !== ModeEnum.basic && (
+ {mode !== ModeEnum.basic && selectServer !== SelectServerEnum.offline && (
onItemSelectedWrapper(MenuItemEnum.Info)} style={item}>
{translate('loadedapp.info') as string}
@@ -121,13 +132,13 @@ const Menu: React.FunctionComponent = ({ onItemSelected, updateMenuSt
)}
- {mode !== ModeEnum.basic && rescanMenu && (
+ {mode !== ModeEnum.basic && rescanMenu && selectServer !== SelectServerEnum.offline && (
onItemSelectedWrapper(MenuItemEnum.Rescan)} style={item}>
{translate('loadedapp.rescanwallet') as string}
)}
- {mode !== ModeEnum.basic && (
+ {mode !== ModeEnum.basic && selectServer !== SelectServerEnum.offline && (
onItemSelectedWrapper(MenuItemEnum.SyncReport)}
@@ -148,7 +159,7 @@ const Menu: React.FunctionComponent = ({ onItemSelected, updateMenuSt
)}
- {mode !== ModeEnum.basic && (
+ {mode !== ModeEnum.basic && netInfo.isConnected && selectServer !== SelectServerEnum.offline && (
onItemSelectedWrapper(MenuItemEnum.ChangeWallet)}
@@ -165,15 +176,19 @@ const Menu: React.FunctionComponent = ({ onItemSelected, updateMenuSt
{translate('loadedapp.restorebackupwallet') as string}
)}
- {mode === ModeEnum.basic && valueTransfers && valueTransfers.length === 0 && (
- onItemSelectedWrapper(MenuItemEnum.LoadWalletFromSeed)}
- style={item}>
- {translate('loadedapp.loadwalletfromseed-basic') as string}
-
- )}
- {mode === ModeEnum.basic && !readOnly && (
+ {mode === ModeEnum.basic &&
+ valueTransfers &&
+ valueTransfers.length === 0 &&
+ netInfo.isConnected &&
+ selectServer !== SelectServerEnum.offline && (
+ onItemSelectedWrapper(MenuItemEnum.LoadWalletFromSeed)}
+ style={item}>
+ {translate('loadedapp.loadwalletfromseed-basic') as string}
+
+ )}
+ {mode === ModeEnum.basic && !readOnly && selectServer !== SelectServerEnum.offline && (
onItemSelectedWrapper(MenuItemEnum.TipZingoLabs)}
@@ -181,7 +196,7 @@ const Menu: React.FunctionComponent = ({ onItemSelected, updateMenuSt
{translate('loadedapp.tipzingolabs-basic') as string}
)}
- {mode !== ModeEnum.basic && !readOnly && (
+ {mode !== ModeEnum.basic && !readOnly && selectServer !== SelectServerEnum.offline && (
onItemSelectedWrapper(MenuItemEnum.VoteForNym)}
diff --git a/app/LoadingApp/LoadingApp.tsx b/app/LoadingApp/LoadingApp.tsx
index bda4d7881..eaaa2797d 100644
--- a/app/LoadingApp/LoadingApp.tsx
+++ b/app/LoadingApp/LoadingApp.tsx
@@ -14,6 +14,7 @@ import {
NativeEventSubscription,
TextInput,
ActivityIndicator,
+ TouchableOpacity,
} from 'react-native';
import Clipboard from '@react-native-community/clipboard';
import { useTheme } from '@react-navigation/native';
@@ -25,7 +26,7 @@ import NetInfo, { NetInfoStateType, NetInfoSubscription } from '@react-native-co
import OptionsMenu from 'react-native-option-menu';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
-import { faEllipsisV } from '@fortawesome/free-solid-svg-icons';
+import { faEllipsisV, faWifi } from '@fortawesome/free-solid-svg-icons';
import RPCModule from '../RPCModule';
import {
@@ -90,6 +91,7 @@ import ImportUfvk from '../../components/Ufvk/ImportUfvk';
import ChainTypeToggle from '../../components/Components/ChainTypeToggle';
import { sendEmail } from '../sendEmail';
import { RPCWalletKindEnum } from '../rpc/enums/RPCWalletKindEnum';
+import FadeText from '../../components/Components/FadeText';
const en = require('../translations/en.json');
const es = require('../translations/es.json');
@@ -252,7 +254,8 @@ export default function LoadingApp(props: LoadingAppProps) {
if (
settings.selectServer === SelectServerEnum.auto ||
settings.selectServer === SelectServerEnum.custom ||
- settings.selectServer === SelectServerEnum.list
+ settings.selectServer === SelectServerEnum.list ||
+ settings.selectServer === SelectServerEnum.offline
) {
setSelectServer(settings.selectServer);
} else {
@@ -389,6 +392,7 @@ export class LoadingAppClass extends Component create a new wallet & go directly to history screen.
// no seed screen.
- this.createNewWallet(false);
- this.setState({ actionButtonsDisabled: false });
- this.navigateToLoadedApp();
- //console.log('navigate to LoadedApp');
+ if (!netInfoState.isConnected || this.state.selectServer === SelectServerEnum.offline) {
+ this.setState({
+ screen: 1,
+ walletExists: false,
+ actionButtonsDisabled: false,
+ });
+ } else {
+ this.createNewWallet(false);
+ this.setState({ actionButtonsDisabled: false });
+ this.navigateToLoadedApp();
+ //console.log('navigate to LoadedApp');
+ }
}
} else {
// if no wallet file & advanced mode -> go to the initial menu.
@@ -625,13 +630,15 @@ export class LoadingAppClass extends Component {
- //console.log('LOADING', 'next', nextAppState, 'prior', this.state.appState);
+ //console.log('LOADING', 'prior', this.state.appStateStatus, 'next', nextAppState);
+ // let's catch the prior value
+ const priorAppState = this.state.appStateStatus;
+ this.setState({ appStateStatus: nextAppState });
if (
- (this.state.appStateStatus === AppStateStatusEnum.inactive ||
- this.state.appStateStatus === AppStateStatusEnum.background) &&
+ (priorAppState === AppStateStatusEnum.inactive || priorAppState === AppStateStatusEnum.background) &&
nextAppState === AppStateStatusEnum.active
) {
- //console.log('App LOADING has come to the foreground!');
+ console.log('App LOADING has come to the foreground!');
// reading background task info
this.fetchBackgroundSyncing();
// setting value for background task Android
@@ -643,13 +650,12 @@ export class LoadingAppClass extends Component {
@@ -667,25 +673,42 @@ export class LoadingAppClass extends Component this.componentDidMount(), 1000);
+ this.setState({
+ screen: screen === 3 ? 3 : screen !== 0 ? 1 : 0,
+ });
}
}
}
}
});
+
+ // if it is offline & there is no wallet file
+ // the screen is going to be empty
+ // show the custom server component
+ if (netInfoState.isConnected && this.state.selectServer === SelectServerEnum.offline && !this.state.walletExists) {
+ this.setState({
+ customServerShow: true,
+ });
+ }
};
componentWillUnmount = () => {
@@ -779,15 +802,15 @@ export class LoadingAppClass extends Component {
// first check the actual server
// if the server is not working properly sometimes can take more than one minute to fail.
- if (start) {
+ if (start && this.state.netInfo.isConnected && this.state.selectServer !== SelectServerEnum.offline) {
this.addLastSnackbar({
message: this.state.translate('restarting') as string,
duration: SnackbarDurationEnum.long,
});
}
- const workingServer = await this.checkServer(this.state.server);
- if (workingServer) {
- // the server is working -> this error is something not related with the server availability
+ // if no internet connection -> show the error.
+ // if Offline mode -> show the error.
+ if (!this.state.netInfo.isConnected || this.state.selectServer === SelectServerEnum.offline) {
createAlert(
this.setBackgroundError,
this.addLastSnackbar,
@@ -800,30 +823,58 @@ export class LoadingAppClass extends Component this error is something not related with the server availability
+ createAlert(
+ this.setBackgroundError,
+ this.addLastSnackbar,
+ title,
+ result,
+ false,
+ this.state.translate,
+ sendEmail,
+ this.state.info.zingolib,
+ );
+ this.setState({ actionButtonsDisabled: false, serverErrorTries: 0, screen });
+ } else {
+ // let's change to another server
+ if (this.state.serverErrorTries === 0) {
+ // first try
+ this.setState({ screen, actionButtonsDisabled: true });
+ this.addLastSnackbar({
+ message: this.state.translate('loadingapp.serverfirsttry') as string,
+ duration: SnackbarDurationEnum.longer,
+ });
+ // a different server.
+ const someServerIsWorking = await this.selectTheBestServer(true);
+ if (someServerIsWorking) {
+ if (start) {
+ this.setState({
+ startingApp: false,
+ serverErrorTries: 1,
+ screen,
+ });
+ this.componentDidMount();
+ } else {
+ createAlert(
+ this.setBackgroundError,
+ this.addLastSnackbar,
+ title,
+ result,
+ false,
+ this.state.translate,
+ sendEmail,
+ this.state.info.zingolib,
+ );
+ this.setState({ actionButtonsDisabled: false, serverErrorTries: 0, screen });
+ }
} else {
createAlert(
this.setBackgroundError,
this.addLastSnackbar,
title,
- result,
+ this.state.translate('loadingapp.noservers') as string,
false,
this.state.translate,
sendEmail,
@@ -832,37 +883,25 @@ export class LoadingAppClass extends Component {
+ createAlert(
+ this.setBackgroundError,
+ this.addLastSnackbar,
+ title,
+ result,
+ false,
+ this.state.translate,
+ sendEmail,
+ this.state.info.zingolib,
+ );
+ this.setState({ actionButtonsDisabled: false, serverErrorTries: 0, screen });
+ }, 1000);
}
- } else {
- // second try
- this.addLastSnackbar({
- message: this.state.translate('loadingapp.serversecondtry') as string,
- duration: SnackbarDurationEnum.longer,
- });
- setTimeout(() => {
- createAlert(
- this.setBackgroundError,
- this.addLastSnackbar,
- title,
- result,
- false,
- this.state.translate,
- sendEmail,
- this.state.info.zingolib,
- );
- this.setState({ actionButtonsDisabled: false, serverErrorTries: 0, screen });
- }, 1000);
}
}
};
@@ -875,41 +914,60 @@ export class LoadingAppClass extends Component {
- if (!this.state.customServerUri) {
+ if (!this.state.customServerUri && !this.state.customServerOffline) {
return;
}
this.setState({ actionButtonsDisabled: true });
- const uri: string = parseServerURI(this.state.customServerUri, this.state.translate);
- const chainName = this.state.customServerChainName;
- if (uri.toLowerCase().startsWith(GlobalConst.error)) {
- this.addLastSnackbar({ message: this.state.translate('settings.isuri') as string });
- this.setState({ actionButtonsDisabled: false });
- return;
- }
-
- this.state.addLastSnackbar({ message: this.state.translate('loadedapp.tryingnewserver') as string });
-
- const cs = {
- uri: uri,
- chainName: chainName,
- region: '',
- default: false,
- latency: null,
- obsolete: false,
- } as ServerUrisType;
- const serverChecked = await selectingServer([cs]);
- if (serverChecked && serverChecked.latency) {
- await SettingsFileImpl.writeSettings(SettingsNameEnum.server, { uri, chainName });
+ if (this.state.customServerOffline) {
+ await SettingsFileImpl.writeSettings(SettingsNameEnum.server, {
+ uri: '',
+ chainName: this.state.server.chainName,
+ });
+ await SettingsFileImpl.writeSettings(SettingsNameEnum.selectServer, SelectServerEnum.offline);
this.setState({
- server: { uri, chainName },
+ selectServer: SelectServerEnum.offline,
+ server: { uri: '', chainName: this.state.server.chainName },
customServerShow: false,
customServerUri: '',
- customServerChainName: ChainNameEnum.mainChainName,
+ customServerChainName: this.state.server.chainName,
+ customServerOffline: false,
});
} else {
- this.state.addLastSnackbar({
- message: (this.state.translate('loadedapp.changeservernew-error') as string) + uri,
- });
+ const uri: string = parseServerURI(this.state.customServerUri, this.state.translate);
+ const chainName = this.state.customServerChainName;
+ if (uri.toLowerCase().startsWith(GlobalConst.error)) {
+ this.addLastSnackbar({ message: this.state.translate('settings.isuri') as string });
+ this.setState({ actionButtonsDisabled: false });
+ return;
+ }
+
+ this.state.addLastSnackbar({ message: this.state.translate('loadedapp.tryingnewserver') as string });
+
+ const cs = {
+ uri: uri,
+ chainName: chainName,
+ region: '',
+ default: false,
+ latency: null,
+ obsolete: false,
+ } as ServerUrisType;
+ const serverChecked = await selectingServer([cs]);
+ if (serverChecked && serverChecked.latency) {
+ await SettingsFileImpl.writeSettings(SettingsNameEnum.server, { uri, chainName });
+ await SettingsFileImpl.writeSettings(SettingsNameEnum.selectServer, SelectServerEnum.custom);
+ this.setState({
+ selectServer: SelectServerEnum.custom,
+ server: { uri, chainName },
+ customServerShow: false,
+ customServerUri: '',
+ customServerChainName: this.state.server.chainName,
+ customServerOffline: false,
+ });
+ } else {
+ this.state.addLastSnackbar({
+ message: (this.state.translate('loadedapp.changeservernew-error') as string) + uri,
+ });
+ }
}
this.setState({ actionButtonsDisabled: false });
};
@@ -923,6 +981,10 @@ export class LoadingAppClass extends Component {
+ if (!this.state.netInfo.isConnected || this.state.selectServer === SelectServerEnum.offline) {
+ this.addLastSnackbar({ message: this.state.translate('loadedapp.connection-error') as string });
+ return;
+ }
this.setState({ actionButtonsDisabled: true });
setTimeout(async () => {
let seed: string = await RPCModule.createNewWallet(this.state.server.uri, this.state.server.chainName);
@@ -1124,17 +1186,17 @@ export class LoadingAppClass extends Component {
- if (this.state.netInfo.isConnected) {
- this.setState({ customServerShow: true });
- } else {
- this.addLastSnackbar({ message: this.state.translate('loadedapp.connection-error') as string });
- }
+ this.setState({ customServerShow: true });
};
onPressServerChainName = (chain: ChainNameEnum) => {
this.setState({ customServerChainName: chain });
};
+ onPressServerOffline = (value: boolean) => {
+ this.setState({ customServerOffline: value });
+ };
+
addLastSnackbar = (snackbar: SnackbarType) => {
const newSnackbars = this.state.snackbars;
// if the last one is the same don't do anything.
@@ -1198,12 +1260,14 @@ export class LoadingAppClass extends Component
)}
+ {!netInfo.isConnected && hasRecoveryWalletInfoSaved && !actionButtonsDisabled && (
+ }
+ buttonStyle={{ width: 40, padding: 10, resizeMode: 'contain' }}
+ destructiveIndex={5}
+ options={[translate('loadingapp.recoverkeys'), translate('cancel')]}
+ actions={[() => this.recoverRecoveryWalletInfo(true)]}
+ />
+ )}
- {netInfo.isConnected && (
+ {selectServer !== SelectServerEnum.offline && (
<>
{`${translate('loadingapp.actualserver') as string} [${
@@ -1349,6 +1422,16 @@ export class LoadingAppClass extends Component{server.uri}
>
)}
+ {selectServer === SelectServerEnum.offline && (
+
+
+ {translate('loadingapp.actualserver') as string}
+
+
+ {' ' + (translate('settings.server-offline') as string)}
+
+
+ )}
{customServerShow && (
-
-
- this.setState({ customServerUri: text })}
- editable={true}
- maxLength={100}
- />
-
+ alignItems: 'center',
+ justifyContent: 'center',
+ margin: 0,
+ marginBottom: 10,
+ paddingHorizontal: 5,
+ paddingVertical: 1,
+ borderColor: customServerOffline ? colors.primary : colors.zingo,
+ borderWidth: customServerOffline ? 2 : 1,
+ borderRadius: 10,
+ minWidth: 25,
+ minHeight: 25,
+ }}>
+ this.onPressServerOffline(!customServerOffline)}>
+
+
+
+ {translate('settings.server-offline') as string}
+
+
+
+
+ )}
+ {!customServerOffline && (
+ <>
+
+
+ this.setState({ customServerUri: text })}
+ editable={!actionButtonsDisabled}
+ maxLength={100}
+ />
+
+ >
+ )}
)}
- {netInfo.isConnected && walletExists && (
-
+ {walletExists && (
+ <>
-
- {translate('loadingapp.noopenwallet-message') as string}
-
+
+
+ {translate('loadingapp.noopenwallet-message') as string}
+
+
-
+
)}
- {syncingStatus.inProgress && (
+ {syncingStatus.inProgress && blocksRemaining > 0 && (
= ({
>
) : (
<>
- {mode === ModeEnum.advanced && (
+ {netInfo.isConnected && mode === ModeEnum.advanced && (
= ({
minWidth: 25,
minHeight: 25,
}}>
-
- syncingStatusMoreInfoOnClick && syncingStatusMoreInfoOnClick()}>
-
-
-
+ syncingStatusMoreInfoOnClick && syncingStatusMoreInfoOnClick()}>
+
+
)}
>
)}
{(!netInfo.isConnected || netInfo.type === NetInfoStateType.cellular || netInfo.isConnectionExpensive) && (
- <>
- {mode !== ModeEnum.basic && (
+
+ {mode === ModeEnum.basic ? (
+
+ ) : (
syncingStatusMoreInfoOnClick && syncingStatusMoreInfoOnClick()}>
)}
- >
+
)}
>
)}
+ {selectServer === SelectServerEnum.offline && (
+
+
+
+
+ {translate('settings.server-offline') as string}
+
+
+
+ )}
{mode !== ModeEnum.basic &&
!noPrivacy &&
setPrivacyOption &&
diff --git a/components/History/History.tsx b/components/History/History.tsx
index 24b7eb7bf..1dd9fd9ee 100644
--- a/components/History/History.tsx
+++ b/components/History/History.tsx
@@ -64,7 +64,7 @@ const History: React.FunctionComponent = ({
scrollToBottom,
}) => {
const context = useContext(ContextAppLoaded);
- const { translate, valueTransfers, language, setBackgroundError, addLastSnackbar } = context;
+ const { translate, valueTransfers, language, setBackgroundError, addLastSnackbar, server } = context;
const { colors } = useTheme() as unknown as ThemeType;
moment.locale(language);
@@ -77,6 +77,7 @@ const History: React.FunctionComponent = ({
const [valueTransfersSliced, setValueTransfersSliced] = useState([]);
const [isAtTop, setIsAtTop] = useState(true);
const [loading, setLoading] = useState(true);
+ const [zennyTips, setZennyTips] = useState('');
const scrollViewRef = useRef(null);
useScrollToTop(scrollViewRef);
@@ -91,7 +92,13 @@ const History: React.FunctionComponent = ({
}, [valueTransfers, numVt]);
useEffect(() => {
+ const fetchZennyTips = async () => {
+ const zt: string = await Utils.getZenniesDonationAddress(server.chainName);
+ setZennyTips(zt);
+ };
+
if (valueTransfers !== null) {
+ fetchZennyTips();
setLoadMoreButton(numVt < (valueTransfers ? valueTransfers.length : 0));
const vts = fetchValueTransfersSliced;
setValueTransfersSliced(vts);
@@ -99,7 +106,7 @@ const History: React.FunctionComponent = ({
setLoading(false);
}, 500);
}
- }, [fetchValueTransfersSliced, numVt, valueTransfers]);
+ }, [fetchValueTransfersSliced, numVt, valueTransfers, server.chainName]);
useEffect(() => {
if (scrollToTop) {
@@ -251,6 +258,7 @@ const History: React.FunctionComponent = ({
}
setSendPageState={setSendPageState}
setMessagesAddressModalShowing={(bbb: boolean) => setMessagesAddressModalShowing(bbb)}
+ addressProtected={vt.address === zennyTips}
/>
);
})}
diff --git a/components/History/components/ValueTransferLine.tsx b/components/History/components/ValueTransferLine.tsx
index a062f7de6..737d2e97d 100644
--- a/components/History/components/ValueTransferLine.tsx
+++ b/components/History/components/ValueTransferLine.tsx
@@ -24,6 +24,7 @@ import {
SendPageStateClass,
ToAddrClass,
RouteEnums,
+ SelectServerEnum,
} from '../../../app/AppState';
import { ThemeType } from '../../../app/types';
import moment from 'moment';
@@ -46,6 +47,7 @@ type ValueTransferLineProps = {
nextLineWithSameTxid: boolean;
setSendPageState: (s: SendPageStateClass) => void;
setMessagesAddressModalShowing: (b: boolean) => void;
+ addressProtected?: boolean;
};
const ValueTransferLine: React.FunctionComponent = ({
index,
@@ -57,9 +59,10 @@ const ValueTransferLine: React.FunctionComponent = ({
nextLineWithSameTxid,
setSendPageState,
setMessagesAddressModalShowing,
+ addressProtected,
}) => {
const context = useContext(ContextAppLoaded);
- const { translate, language, privacy, info, navigation, showSwipeableIcons } = context;
+ const { translate, language, privacy, info, navigation, showSwipeableIcons, readOnly, selectServer } = context;
const { colors } = useTheme() as unknown as ThemeType;
moment.locale(language);
@@ -194,7 +197,7 @@ const ValueTransferLine: React.FunctionComponent = ({
- {!!vt.address && (
+ {!!vt.address && !readOnly && selectServer !== SelectServerEnum.offline && !addressProtected && (
= ({ closeModal, setZecPrice }) =
label={translate('info.version') as string}
value={translate('zingo') + ' ' + translate('version')}
/>
-
-
+
+
= ({ closeModal, setZecPrice }) =
/>
{currency === CurrencyEnum.USDCurrency && (
diff --git a/components/Rescan/Rescan.tsx b/components/Rescan/Rescan.tsx
index 814a6b605..b3e01eb87 100644
--- a/components/Rescan/Rescan.tsx
+++ b/components/Rescan/Rescan.tsx
@@ -12,7 +12,7 @@ import moment from 'moment';
import 'moment/locale/es';
import 'moment/locale/pt';
import 'moment/locale/ru';
-import { ButtonTypeEnum } from '../../app/AppState';
+import { ButtonTypeEnum, SelectServerEnum } from '../../app/AppState';
type RescanProps = {
closeModal: () => void;
@@ -21,12 +21,12 @@ type RescanProps = {
const Rescan: React.FunctionComponent = ({ closeModal, doRescan }) => {
const context = useContext(ContextAppLoaded);
- const { wallet, translate, netInfo, addLastSnackbar, language } = context;
+ const { wallet, translate, netInfo, addLastSnackbar, language, selectServer } = context;
const { colors } = useTheme() as unknown as ThemeType;
moment.locale(language);
const doRescanAndClose = () => {
- if (!netInfo.isConnected) {
+ if (!netInfo.isConnected || selectServer === SelectServerEnum.offline) {
addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
return;
}
diff --git a/components/Send/Send.tsx b/components/Send/Send.tsx
index 838ca597e..6e804ace7 100644
--- a/components/Send/Send.tsx
+++ b/components/Send/Send.tsx
@@ -78,7 +78,14 @@ type SendProps = {
setShieldingAmount: (value: number) => void;
setScrollToTop: (value: boolean) => void;
setScrollToBottom: (value: boolean) => void;
- setServerOption: (value: ServerType, toast: boolean, sameServerChainName: boolean) => Promise;
+ setServerOption: (
+ value: ServerType,
+ selectServer: SelectServerEnum,
+ toast: boolean,
+ sameServerChainName: boolean,
+ ) => Promise;
+ clearTimers: () => Promise;
+ configure: () => Promise;
};
const Send: React.FunctionComponent = ({
@@ -96,6 +103,8 @@ const Send: React.FunctionComponent = ({
setScrollToTop,
setScrollToBottom,
setServerOption,
+ clearTimers,
+ configure,
}) => {
const context = useContext(ContextAppLoaded);
const {
@@ -526,10 +535,6 @@ const Send: React.FunctionComponent = ({
useEffect(() => {
const getMemoEnabled = async (address: string, serverChainName: string): Promise => {
- if (!netInfo.isConnected) {
- addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
- return false;
- }
return await Utils.isValidOrchardOrSaplingAddress(address, serverChainName);
};
@@ -547,14 +552,10 @@ const Send: React.FunctionComponent = ({
updateToField(null, null, null, '', false);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
- }, [server.chainName, netInfo.isConnected, sendPageState.toaddr.to, translate, addLastSnackbar]);
+ }, [server.chainName, sendPageState.toaddr.to]);
useEffect(() => {
const parseAddress = async (address: string, serverChainName: string): Promise => {
- if (!netInfo.isConnected) {
- addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
- return false;
- }
return await Utils.isValidAddress(address, serverChainName);
};
@@ -610,15 +611,12 @@ const Send: React.FunctionComponent = ({
donationAddress,
decimalSeparator,
server.chainName,
- netInfo.isConnected,
sendPageState.toaddr,
sendPageState.toaddr.to,
sendPageState.toaddr.amountCurrency,
sendPageState.toaddr.amount,
sendPageState.toaddr.memo,
sendPageState.toaddr.includeUAMemo,
- translate,
- addLastSnackbar,
spendable,
fee,
maxAmount,
@@ -717,11 +715,13 @@ const Send: React.FunctionComponent = ({
}, [addresses, sendPageState.toaddr.to, server.chainName]);
const confirmSend = async () => {
- if (!netInfo.isConnected) {
+ if (!netInfo.isConnected || selectServer === SelectServerEnum.offline) {
setConfirmModalVisible(false);
addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
return;
}
+ // clear first all interval tasks
+ await clearTimers();
// first interrupt syncing Just in case...
await RPC.rpcSetInterruptSyncAfterBatch(GlobalConst.true);
// First, close the confirm modal and show the "computing" modal
@@ -738,9 +738,13 @@ const Send: React.FunctionComponent = ({
// call the sendTransaction method in a timeout, allowing the modals to show properly
setTimeout(async () => {
+ let error = '';
+ let customError: string | undefined;
try {
const txid = await sendTransaction(setLocalSendProgress);
+ // create all interval tasks
+ await configure();
// Clear the fields
clearToAddr();
@@ -763,16 +767,16 @@ const Send: React.FunctionComponent = ({
setComputingModalVisible(false);
// the app send successfully on the first attemp.
return;
- } catch (err) {
- let error = err as string;
+ } catch (err1) {
+ error = err1 as string;
- let customError = interceptCustomError(error);
+ customError = interceptCustomError(error);
// in this point the App is failing, there is two possibilities:
// 1. Server Error
// 2. Another type of Error
// here is worth it to try again with the best working server...
- // if the user salected a `custom` server, then we cannot change it.
+ // if the user selected a `custom` server, then we cannot change it.
if (!customError && selectServer !== SelectServerEnum.custom) {
// try send again with a working server
const serverChecked = await selectingServer(serverUris(translate).filter((s: ServerUrisType) => !s.obsolete));
@@ -788,7 +792,7 @@ const Send: React.FunctionComponent = ({
console.log(serverChecked);
console.log(fasterServer);
if (fasterServer.uri !== server.uri) {
- setServerOption(fasterServer, false, true);
+ setServerOption(fasterServer, selectServer, false, true);
// first interrupt syncing Just in case...
await RPC.rpcSetInterruptSyncAfterBatch(GlobalConst.true);
}
@@ -796,6 +800,8 @@ const Send: React.FunctionComponent = ({
try {
const txid = await sendTransaction(setLocalSendProgress);
+ // create all interval tasks
+ await configure();
// Clear the fields
clearToAddr();
@@ -824,24 +830,26 @@ const Send: React.FunctionComponent = ({
customError = interceptCustomError(error);
}
}
-
- setTimeout(() => {
- //console.log('sendtx error', error);
- // if the App is in background I need to store the error
- // and when the App come back to foreground shows it to the user.
- createAlert(
- setBackgroundError,
- addLastSnackbar,
- translate('send.sending-error') as string,
- `${customError ? customError : error}`,
- false,
- translate,
- sendEmail,
- info.zingolib,
- );
- }, 1000);
- setComputingModalVisible(false);
}
+ // create all interval tasks
+ await configure();
+
+ setTimeout(() => {
+ //console.log('sendtx error', error);
+ // if the App is in background I need to store the error
+ // and when the App come back to foreground shows it to the user.
+ createAlert(
+ setBackgroundError,
+ addLastSnackbar,
+ translate('send.sending-error') as string,
+ `${customError ? customError : error}`,
+ false,
+ translate,
+ sendEmail,
+ info.zingolib,
+ );
+ }, 1000);
+ setComputingModalVisible(false);
});
};
@@ -1739,7 +1747,7 @@ const Send: React.FunctionComponent = ({
updateToField(null, Utils.getZenniesDonationAmount(), null, null, false);
return;
}
- if (!netInfo.isConnected) {
+ if (!netInfo.isConnected || selectServer === SelectServerEnum.offline) {
addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
return;
}
diff --git a/components/Send/components/Confirm.tsx b/components/Send/components/Confirm.tsx
index 712ed9e7a..b5a9206bc 100644
--- a/components/Send/components/Confirm.tsx
+++ b/components/Send/components/Confirm.tsx
@@ -63,7 +63,6 @@ const Confirm: React.FunctionComponent = ({
uaAddress,
privacy,
totalBalance,
- netInfo,
addLastSnackbar,
server,
security,
@@ -86,11 +85,6 @@ const Confirm: React.FunctionComponent = ({
* @returns {string} The privacy level.
*/
const getPrivacyLevel = useCallback(async () => {
- if (!netInfo.isConnected) {
- addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
- return '-';
- }
-
let from: PrivacyLevelFromEnum = PrivacyLevelFromEnum.nonePrivacyLevel;
const totalAmount: number = Utils.parseStringLocaleToNumberFloat(
Utils.parseNumberFloatToStringLocale(
@@ -218,9 +212,7 @@ const Confirm: React.FunctionComponent = ({
return '-';
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
- addLastSnackbar,
calculatedFee,
- netInfo.isConnected,
sendPageState.toaddr.amount,
sendPageState.toaddr.to,
server.chainName,
diff --git a/components/Send/components/ScannerAddress.tsx b/components/Send/components/ScannerAddress.tsx
index 449ea8362..98cb2edce 100644
--- a/components/Send/components/ScannerAddress.tsx
+++ b/components/Send/components/ScannerAddress.tsx
@@ -17,14 +17,10 @@ type ScannerAddressProps = {
const ScannerAddress: React.FunctionComponent = ({ setAddress, closeModal }) => {
const context = useContext(ContextAppLoaded);
- const { translate, netInfo, server, addLastSnackbar, language } = context;
+ const { translate, server, language } = context;
moment.locale(language);
const validateAddress = async (scannedAddress: string) => {
- if (!netInfo.isConnected) {
- addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
- return;
- }
if (scannedAddress.toLowerCase().startsWith(GlobalConst.zcash)) {
setAddress(scannedAddress);
closeModal();
diff --git a/components/Settings/Settings.tsx b/components/Settings/Settings.tsx
index 247fbe173..42b4d39ee 100644
--- a/components/Settings/Settings.tsx
+++ b/components/Settings/Settings.tsx
@@ -42,7 +42,12 @@ import { hasRecoveryWalletInfo } from '../../app/recoveryWalletInfo';
type SettingsProps = {
closeModal: () => void;
setWalletOption: (walletOption: string, value: string) => Promise;
- setServerOption: (value: ServerType, toast: boolean, sameServerChainName: boolean) => Promise;
+ setServerOption: (
+ value: ServerType,
+ selectServer: SelectServerEnum,
+ toast: boolean,
+ sameServerChainName: boolean,
+ ) => Promise;
setCurrencyOption: (value: CurrencyEnum) => Promise;
setLanguageOption: (value: LanguageEnum, reset: boolean) => Promise;
setSendAllOption: (value: boolean) => Promise;
@@ -159,9 +164,9 @@ const Settings: React.FunctionComponent = ({
const [autoServerChainName, setAutoServerChainName] = useState('');
const [listServerUri, setListServerUri] = useState('');
const [listServerChainName, setListServerChainName] = useState('');
- const [itemsPicker, setItemsPicker] = useState<{ label: string; value: string }[]>([]);
const [customServerUri, setCustomServerUri] = useState('');
const [customServerChainName, setCustomServerChainName] = useState('');
+ const [itemsPicker, setItemsPicker] = useState<{ label: string; value: string }[]>([]);
const [currency, setCurrency] = useState(currencyContext);
const [language, setLanguage] = useState(languageContext);
const [sendAll, setSendAll] = useState(sendAllContext);
@@ -185,9 +190,10 @@ const Settings: React.FunctionComponent = ({
recoveryWalletInfoOnDeviceContext,
);
- const [customIcon, setCustomIcon] = useState(farCircle);
const [autoIcon, setAutoIcon] = useState(farCircle);
const [listIcon, setListIcon] = useState(farCircle);
+ const [customIcon, setCustomIcon] = useState(farCircle);
+ const [offlineIcon, setOfflineIcon] = useState(farCircle);
const [disabled, setDisabled] = useState();
const [titleViewHeight, setTitleViewHeight] = useState(0);
const [hasRecoveryWalletInfoSaved, setHasRecoveryWalletInfoSaved] = useState(false);
@@ -225,6 +231,12 @@ const Settings: React.FunctionComponent = ({
// with the first of the list
setAutoServerUri(serverUris(translate)[0].uri);
setAutoServerChainName(serverUris(translate)[0].chainName);
+ } else if (selectServerContext === SelectServerEnum.offline) {
+ setOfflineIcon(faDotCircle);
+ // I have to update them in auto as well
+ // with the first of the list
+ setAutoServerUri(serverUris(translate)[0].uri);
+ setAutoServerChainName(serverUris(translate)[0].chainName);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []); // only the first time
@@ -280,6 +292,9 @@ const Settings: React.FunctionComponent = ({
} else if (selectServer === SelectServerEnum.custom) {
serverUriParsed = customServerUri;
chainNameParsed = customServerChainName;
+ } else if (selectServer === SelectServerEnum.offline) {
+ serverUriParsed = '';
+ chainNameParsed = ChainNameEnum.mainChainName;
}
let sameServerChainName = true;
const chainName = serverContext.chainName;
@@ -310,7 +325,7 @@ const Settings: React.FunctionComponent = ({
addLastSnackbar({ message: translate('settings.isthreshold') as string });
return;
}
- if (!serverUriParsed || !chainNameParsed) {
+ if ((!serverUriParsed || !chainNameParsed) && selectServer !== SelectServerEnum.offline) {
addLastSnackbar({ message: translate('settings.isserver') as string });
return;
}
@@ -319,7 +334,7 @@ const Settings: React.FunctionComponent = ({
return;
}
- if (serverContext.uri !== serverUriParsed) {
+ if (serverContext.uri !== serverUriParsed && selectServer !== SelectServerEnum.offline) {
const resultUri = parseServerURI(serverUriParsed, translate);
if (resultUri.toLowerCase().startsWith(GlobalConst.error)) {
addLastSnackbar({ message: translate('settings.isuri') as string });
@@ -343,14 +358,29 @@ const Settings: React.FunctionComponent = ({
}
}
- if (!netInfo.isConnected) {
- addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
+ if (
+ (serverContext.uri !== serverUriParsed || selectServerContext !== selectServer) &&
+ !serverUriParsed &&
+ selectServer !== SelectServerEnum.offline
+ ) {
+ addLastSnackbar({ message: translate('settings.isuri') as string });
return;
}
if (serverContext.uri !== serverUriParsed || serverContext.chainName !== chainNameParsed) {
+ // if the user is changing -> to Offline mode.
+ // doesn't matter is the device have or not internet connection.
+ if (
+ !netInfo.isConnected &&
+ !(selectServerContext !== SelectServerEnum.offline && selectServer === SelectServerEnum.offline)
+ ) {
+ addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
+ return;
+ }
setDisabled(true);
- addLastSnackbar({ message: translate('loadedapp.tryingnewserver') as string });
+ if (serverUriParsed) {
+ addLastSnackbar({ message: translate('loadedapp.tryingnewserver') as string });
+ }
const { result, timeout, newChainName } = await checkServerURI(serverUriParsed, serverContext.uri);
if (!result) {
// if the server checking takes more then 30 seconds.
@@ -363,7 +393,7 @@ const Settings: React.FunctionComponent = ({
}
// in this point the sync process is blocked, who knows why.
// if I save the actual server before the customization... is going to work.
- setServerOption(serverContext, false, sameServerChainName);
+ setServerOption(serverContext, selectServerContext, false, sameServerChainName);
setDisabled(false);
return;
} else {
@@ -375,9 +405,17 @@ const Settings: React.FunctionComponent = ({
}
if (walletSettings.downloadMemos !== memos) {
+ if (!netInfo.isConnected || selectServer === SelectServerEnum.offline) {
+ addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
+ return;
+ }
await setWalletOption(WalletOptionEnum.downloadMemos, memos);
}
if (walletSettings.transactionFilterThreshold !== filter) {
+ if (!netInfo.isConnected || selectServer === SelectServerEnum.offline) {
+ addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
+ return;
+ }
await setWalletOption(WalletOptionEnum.transactionFilterThreshold, filter);
}
if (currencyContext !== currency) {
@@ -398,9 +436,6 @@ const Settings: React.FunctionComponent = ({
if (!isEqual(securityContext, securityObject())) {
await setSecurityOption(securityObject());
}
- if (selectServerContext !== selectServer) {
- await setSelectServerOption(selectServer);
- }
if (rescanMenuContext !== rescanMenu) {
await setRescanMenuOption(rescanMenu);
}
@@ -414,9 +449,17 @@ const Settings: React.FunctionComponent = ({
if (languageContext !== language) {
await setLanguageOption(language, false);
}
- setServerOption({ uri: serverUriParsed, chainName: chainNameParsed } as ServerType, true, sameServerChainName);
+ setServerOption(
+ { uri: serverUriParsed, chainName: chainNameParsed } as ServerType,
+ selectServer,
+ true,
+ sameServerChainName,
+ );
ms = 1500;
} else {
+ if (selectServerContext !== selectServer) {
+ await setSelectServerOption(selectServer);
+ }
if (languageContext !== language) {
await setLanguageOption(language, true);
}
@@ -638,12 +681,36 @@ const Settings: React.FunctionComponent = ({
+
+ {
+ setOfflineIcon(faDotCircle);
+ setAutoIcon(farCircle);
+ setListIcon(farCircle);
+ setCustomIcon(farCircle);
+ setSelectServer(SelectServerEnum.offline);
+ }}>
+
+ {offlineIcon && }
+ {translate('settings.server-offline') as string}
+ {offlineIcon === faDotCircle && {''}}
+
+
+
+
+ {translate('settings.server-offline-text') as string}
+
+
{
+ setOfflineIcon(farCircle);
setAutoIcon(faDotCircle);
setListIcon(farCircle);
setCustomIcon(farCircle);
@@ -675,6 +742,7 @@ const Settings: React.FunctionComponent = ({
onValueChange={(itemValue: string) => {
//console.log(JSON.stringify(item));
if (itemValue) {
+ setOfflineIcon(farCircle);
setAutoIcon(farCircle);
setListIcon(faDotCircle);
setCustomIcon(farCircle);
@@ -814,6 +882,7 @@ const Settings: React.FunctionComponent = ({
customServerChainName={customServerChainName}
onPress={onPressServerChainName}
translate={translate}
+ disabled={disabled}
/>
diff --git a/components/Settings/SettingsFileImpl.ts b/components/Settings/SettingsFileImpl.ts
index f635d6831..f4cd99b95 100644
--- a/components/Settings/SettingsFileImpl.ts
+++ b/components/Settings/SettingsFileImpl.ts
@@ -66,10 +66,11 @@ export default class SettingsFileImpl {
}
} else {
if (!settings.server.uri || !settings.server.chainName) {
- // if one or both field/s don't have valid value -> we assign the default server.
+ // if one or both field/s don't have valid value -> we assign offline mode.
+ // this is the most accurate decision since we have offline mode.
settings.server = {
- uri: serverUris(() => {})[0].uri,
- chainName: serverUris(() => {})[0].chainName,
+ uri: '',
+ chainName: ChainNameEnum.mainChainName, // for now this is correct, in some future this have to be ''.
} as ServerType;
}
}
@@ -101,13 +102,16 @@ export default class SettingsFileImpl {
}
if (!settings.hasOwnProperty(SettingsNameEnum.selectServer)) {
// this is the first time the App have selection server
- // here just exists 5 options:
+ // here just exists 6 options:
+ // - server empty -> offline
// - lightwalletd (obsolete) -> auto
// - zcash-infra (default) -> auto
// - custom server -> mainnet (new - not default)
// - custom server -> mainnet (not in the list)
// - custom server -> testnet or regtest
- if (
+ if (!settings.server.uri) {
+ settings.selectServer = SelectServerEnum.offline;
+ } else if (
serverUris(() => {})
.filter((s: ServerUrisType) => s.obsolete)
.find((s: ServerUrisType) =>
diff --git a/components/Ufvk/ImportUfvk.tsx b/components/Ufvk/ImportUfvk.tsx
index 47edfde62..cf095c694 100644
--- a/components/Ufvk/ImportUfvk.tsx
+++ b/components/Ufvk/ImportUfvk.tsx
@@ -18,7 +18,7 @@ import moment from 'moment';
import 'moment/locale/es';
import 'moment/locale/pt';
import 'moment/locale/ru';
-import { ButtonTypeEnum, GlobalConst } from '../../app/AppState';
+import { ButtonTypeEnum, GlobalConst, SelectServerEnum } from '../../app/AppState';
type ImportUfvkProps = {
onClickCancel: () => void;
@@ -26,7 +26,7 @@ type ImportUfvkProps = {
};
const ImportUfvk: React.FunctionComponent = ({ onClickCancel, onClickOK }) => {
const context = useContext(ContextAppLoading);
- const { translate, netInfo, info, server, mode, addLastSnackbar, language } = context;
+ const { translate, netInfo, info, server, mode, addLastSnackbar, language, selectServer } = context;
const { colors } = useTheme() as unknown as ThemeType;
moment.locale(language);
@@ -57,17 +57,19 @@ const ImportUfvk: React.FunctionComponent = ({ onClickCancel, o
if (info.latestBlock) {
setLatestBlock(info.latestBlock);
} else {
- (async () => {
- const resp: string = await RPCModule.getLatestBlock(server.uri);
- //console.log(resp);
- if (resp && !resp.toLowerCase().startsWith(GlobalConst.error)) {
- setLatestBlock(Number(resp));
- } else {
- //console.log('error latest block', resp);
- }
- })();
+ if (selectServer !== SelectServerEnum.offline) {
+ (async () => {
+ const resp: string = await RPCModule.getLatestBlock(server.uri);
+ //console.log(resp);
+ if (resp && !resp.toLowerCase().startsWith(GlobalConst.error)) {
+ setLatestBlock(Number(resp));
+ } else {
+ //console.log('error latest block', resp);
+ }
+ })();
+ }
}
- }, [info.latestBlock, latestBlock, server]);
+ }, [info.latestBlock, server, selectServer]);
useEffect(() => {
if (seedufvkText) {
@@ -109,7 +111,7 @@ const ImportUfvk: React.FunctionComponent = ({ onClickCancel, o
}, [seedufvkText]);
const okButton = async () => {
- if (!netInfo.isConnected) {
+ if (!netInfo.isConnected || selectServer === SelectServerEnum.offline) {
addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
return;
}
@@ -258,10 +260,11 @@ const ImportUfvk: React.FunctionComponent = ({ onClickCancel, o
{translate('import.birthday') as string}
-
- {translate('seed.birthday-no-readonly') + ' (1, ' + (latestBlock ? latestBlock.toString() : '--') + ')'}
-
-
+ {selectServer !== SelectServerEnum.offline && (
+
+ {translate('seed.birthday-no-readonly') + ' (1, ' + (latestBlock ? latestBlock.toString() : '--') + ')'}
+
+ )}
= ({ onClickCancel, o
onChangeText={(text: string) => {
if (isNaN(Number(text))) {
setBirthday('');
- } else if (Number(text) <= 0 || Number(text) > latestBlock) {
+ } else if (
+ Number(text) <= 0 ||
+ (Number(text) > latestBlock && selectServer !== SelectServerEnum.offline)
+ ) {
setBirthday('');
} else {
setBirthday(Number(text.replace('.', '').replace(',', '')).toFixed(0));
}
}}
- editable={latestBlock ? true : false}
+ editable={latestBlock ? true : selectServer !== SelectServerEnum.offline ? false : true}
keyboardType="numeric"
/>
diff --git a/components/Ufvk/ShowUfvk.tsx b/components/Ufvk/ShowUfvk.tsx
index 0ad2876ee..5fe7129dd 100644
--- a/components/Ufvk/ShowUfvk.tsx
+++ b/components/Ufvk/ShowUfvk.tsx
@@ -33,7 +33,7 @@ type ShowUfvkProps = {
};
const ShowUfvk: React.FunctionComponent = ({ onClickOK, onClickCancel, action, setPrivacyOption }) => {
const context = useContext(ContextAppLoaded);
- const { translate, wallet, server, netInfo, mode, addLastSnackbar, language } = context;
+ const { translate, wallet, server, mode, addLastSnackbar, language } = context;
const { colors } = useTheme() as unknown as ThemeType;
moment.locale(language);
@@ -148,10 +148,6 @@ const ShowUfvk: React.FunctionComponent = ({ onClickOK, onClickCa
if (!wallet.ufvk) {
return;
}
- if (!netInfo.isConnected && times > 0) {
- addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
- return;
- }
if (times === 0) {
onClickOK();
} else if (times === 1) {
diff --git a/ios/RPCModule.swift b/ios/RPCModule.swift
index f06be58bf..a459b62b8 100644
--- a/ios/RPCModule.swift
+++ b/ios/RPCModule.swift
@@ -278,26 +278,60 @@ class RPCModule: NSObject {
}
}
+ func fnDoSave(_ dict: [AnyHashable: Any]) {
+ if let resolve = dict["resolve"] as? RCTPromiseResolveBlock {
+ do {
+ try self.saveWalletInternal()
+ resolve("true")
+ } catch {
+ NSLog("Saving wallet error: \(error.localizedDescription)")
+ resolve("false")
+ }
+ } else {
+ let err = "Error: [Native] Save wallet. Argument problem."
+ NSLog(err)
+ if let resolve = dict["resolve"] as? RCTPromiseResolveBlock {
+ resolve(err)
+ }
+ }
+ }
+
@objc(doSave:reject:)
func doSave(_ resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
- do {
- try self.saveWalletInternal()
- resolve("true")
- } catch {
- NSLog("Saving wallet error: \(error.localizedDescription)")
- resolve("false")
+ let dict: [String: Any] = ["resolve": resolve]
+ DispatchQueue.global().async { [weak self] in
+ if let self = self {
+ self.fnDoSave(dict)
+ }
+ }
+ }
+
+ func fndoSaveBackup(_ dict: [AnyHashable: Any]) {
+ if let resolve = dict["resolve"] as? RCTPromiseResolveBlock {
+ do {
+ try self.saveWalletBackupInternal()
+ resolve("true")
+ } catch {
+ NSLog("Saving wallet backup error: \(error.localizedDescription)")
+ resolve("false")
+ }
+ } else {
+ let err = "Error: [Native] Save wallet backup. Argument problem."
+ NSLog(err)
+ if let resolve = dict["resolve"] as? RCTPromiseResolveBlock {
+ resolve(err)
+ }
}
}
@objc(doSaveBackup:reject:)
func doSaveBackup(_ resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
- do {
- try self.saveWalletBackupInternal()
- resolve("true")
- } catch {
- NSLog("Saving wallet backup error: \(error.localizedDescription)")
- resolve("false")
- }
+ let dict: [String: Any] = ["resolve": resolve]
+ DispatchQueue.global().async { [weak self] in
+ if let self = self {
+ self.fndoSaveBackup(dict)
+ }
+ }
}
func doExecuteOnThread(_ dict: [String: Any]) {
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
index 1ac25e966..05ce7ece4 100644
--- a/rust/Cargo.lock
+++ b/rust/Cargo.lock
@@ -131,9 +131,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.93"
+version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775"
+checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7"
[[package]]
name = "append-only-vec"
@@ -181,7 +181,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -218,7 +218,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -229,7 +229,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -426,7 +426,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
- "syn 2.0.89",
+ "syn 2.0.90",
"which",
]
@@ -594,7 +594,7 @@ dependencies = [
[[package]]
name = "build_utils"
version = "0.1.0"
-source = "git+https://github.com/zingolabs/zingolib?tag=1.10.2#af354754bbf254aeadf48f057f653c2667c07cdd"
+source = "git+https://github.com/zingolabs/zingolib?branch=dev#f51c7f36b645e2e367ad465c9ec980a53b1757c8"
[[package]]
name = "bumpalo"
@@ -610,9 +610,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.8.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
+checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
[[package]]
name = "camino"
@@ -657,9 +657,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.2.1"
+version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47"
+checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d"
dependencies = [
"jobserver",
"libc",
@@ -707,9 +707,9 @@ dependencies = [
[[package]]
name = "chrono"
-version = "0.4.38"
+version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
+checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"android-tzdata",
"iana-time-zone",
@@ -773,7 +773,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -784,9 +784,9 @@ checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7"
[[package]]
name = "cmake"
-version = "0.1.51"
+version = "0.1.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a"
+checksum = "c682c223677e0e5b6b7f63a64b9351844c3f1b1678a68b7ee617e30fb082620e"
dependencies = [
"cc",
]
@@ -891,7 +891,7 @@ dependencies = [
[[package]]
name = "darkside-tests"
version = "0.1.0"
-source = "git+https://github.com/zingolabs/zingolib?tag=1.10.2#af354754bbf254aeadf48f057f653c2667c07cdd"
+source = "git+https://github.com/zingolabs/zingolib?branch=dev#f51c7f36b645e2e367ad465c9ec980a53b1757c8"
dependencies = [
"futures-util",
"hex",
@@ -911,10 +911,11 @@ dependencies = [
"tokio",
"tonic",
"tonic-build",
- "tower 0.4.13",
+ "tower 0.5.1",
"zcash_client_backend",
"zcash_primitives",
"zingo-netutils",
+ "zingo-sync",
"zingolib",
]
@@ -985,7 +986,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -1027,7 +1028,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -1060,12 +1061,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "errno"
-version = "0.3.9"
+version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
+checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
dependencies = [
"libc",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -1078,9 +1079,9 @@ dependencies = [
[[package]]
name = "fastrand"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4"
+checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "ff"
@@ -1226,7 +1227,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -1289,7 +1290,7 @@ dependencies = [
"proc-macro-error2",
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -1339,7 +1340,7 @@ dependencies = [
"futures-core",
"futures-sink",
"http",
- "indexmap 2.6.0",
+ "indexmap 2.7.0",
"slab",
"tokio",
"tokio-util",
@@ -1448,9 +1449,9 @@ dependencies = [
[[package]]
name = "http"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
+checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea"
dependencies = [
"bytes",
"fnv",
@@ -1754,7 +1755,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -1803,9 +1804,9 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.6.0"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
+checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f"
dependencies = [
"equivalent",
"hashbrown 0.15.2",
@@ -1870,9 +1871,9 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.13"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2"
+checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
[[package]]
name = "jobserver"
@@ -1885,10 +1886,11 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.72"
+version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9"
+checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7"
dependencies = [
+ "once_cell",
"wasm-bindgen",
]
@@ -1938,15 +1940,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
-version = "0.2.164"
+version = "0.2.168"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f"
+checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
[[package]]
name = "libloading"
-version = "0.8.5"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
+checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
dependencies = [
"cfg-if",
"windows-targets 0.52.6",
@@ -2103,11 +2105,10 @@ dependencies = [
[[package]]
name = "mio"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
+checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
dependencies = [
- "hermit-abi 0.3.9",
"libc",
"wasi",
"windows-sys 0.52.0",
@@ -2251,7 +2252,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -2411,7 +2412,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
dependencies = [
"fixedbitset",
- "indexmap 2.6.0",
+ "indexmap 2.7.0",
]
[[package]]
@@ -2431,7 +2432,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -2500,7 +2501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033"
dependencies = [
"proc-macro2",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -2522,7 +2523,7 @@ dependencies = [
"proc-macro-error-attr2",
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -2556,9 +2557,9 @@ dependencies = [
[[package]]
name = "prost"
-version = "0.13.3"
+version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f"
+checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec"
dependencies = [
"bytes",
"prost-derive",
@@ -2566,12 +2567,11 @@ dependencies = [
[[package]]
name = "prost-build"
-version = "0.13.3"
+version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15"
+checksum = "d0f3e5beed80eb580c68e2c600937ac2c4eedabdfd5ef1e5b7ea4f3fba84497b"
dependencies = [
- "bytes",
- "heck 0.4.1",
+ "heck 0.5.0",
"itertools 0.13.0",
"log",
"multimap",
@@ -2581,28 +2581,28 @@ dependencies = [
"prost",
"prost-types",
"regex",
- "syn 2.0.89",
+ "syn 2.0.90",
"tempfile",
]
[[package]]
name = "prost-derive"
-version = "0.13.3"
+version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5"
+checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3"
dependencies = [
"anyhow",
"itertools 0.13.0",
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
name = "prost-types"
-version = "0.13.3"
+version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670"
+checksum = "cc2f1e56baa61e93533aebc21af4d2134b70f66275e0fcdf3cbe43d77ff7e8fc"
dependencies = [
"prost",
]
@@ -2923,7 +2923,7 @@ dependencies = [
"proc-macro2",
"quote",
"rust-embed-utils",
- "syn 2.0.89",
+ "syn 2.0.90",
"walkdir",
]
@@ -2951,22 +2951,22 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustix"
-version = "0.38.41"
+version = "0.38.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6"
+checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
dependencies = [
"bitflags",
"errno",
"libc",
"linux-raw-sys",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "rustls"
-version = "0.23.18"
+version = "0.23.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f"
+checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1"
dependencies = [
"aws-lc-rs",
"log",
@@ -3114,7 +3114,7 @@ checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -3216,7 +3216,7 @@ checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -3239,7 +3239,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -3264,7 +3264,7 @@ dependencies = [
"chrono",
"hex",
"indexmap 1.9.3",
- "indexmap 2.6.0",
+ "indexmap 2.7.0",
"serde",
"serde_derive",
"serde_json",
@@ -3277,7 +3277,7 @@ version = "0.9.34+deprecated"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
dependencies = [
- "indexmap 2.6.0",
+ "indexmap 2.7.0",
"itoa",
"ryu",
"serde",
@@ -3360,9 +3360,9 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c"
[[package]]
name = "socket2"
-version = "0.5.7"
+version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
+checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
dependencies = [
"libc",
"windows-sys 0.52.0",
@@ -3411,9 +3411,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.89"
+version = "2.0.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e"
+checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
dependencies = [
"proc-macro2",
"quote",
@@ -3443,7 +3443,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -3523,7 +3523,7 @@ dependencies = [
"cfg-if",
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -3534,7 +3534,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
"test-case-core",
]
@@ -3564,7 +3564,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -3589,9 +3589,9 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.36"
+version = "0.3.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
+checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21"
dependencies = [
"deranged",
"itoa",
@@ -3610,9 +3610,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.18"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
+checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de"
dependencies = [
"num-conv",
"time-core",
@@ -3645,9 +3645,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.41.1"
+version = "1.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33"
+checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551"
dependencies = [
"backtrace",
"bytes",
@@ -3669,7 +3669,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -3684,20 +3684,19 @@ dependencies = [
[[package]]
name = "tokio-rustls"
-version = "0.26.0"
+version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
+checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37"
dependencies = [
"rustls",
- "rustls-pki-types",
"tokio",
]
[[package]]
name = "tokio-stream"
-version = "0.1.16"
+version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1"
+checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
dependencies = [
"futures-core",
"pin-project-lite",
@@ -3706,9 +3705,9 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.7.12"
+version = "0.7.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a"
+checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078"
dependencies = [
"bytes",
"futures-core",
@@ -3771,7 +3770,7 @@ dependencies = [
"prost-build",
"prost-types",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -3822,11 +3821,10 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
-version = "0.1.40"
+version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
+checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
dependencies = [
- "log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
@@ -3834,20 +3832,20 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.27"
+version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
+checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
name = "tracing-core"
-version = "0.1.32"
+version = "0.1.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
dependencies = [
"once_cell",
"valuable",
@@ -3866,9 +3864,9 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
+checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
dependencies = [
"nu-ansi-term",
"sharded-slab",
@@ -3995,7 +3993,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5c400339a9d1d17be34257d0b407e91d64af335e5b4fa49f4bf28467fc8d635"
dependencies = [
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -4026,7 +4024,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
- "syn 2.0.89",
+ "syn 2.0.90",
"toml",
"uniffi_meta",
]
@@ -4155,7 +4153,7 @@ checksum = "d674d135b4a8c1d7e813e2f8d1c9a58308aee4a680323066025e53132218bd91"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -4194,9 +4192,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.95"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
+checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396"
dependencies = [
"cfg-if",
"once_cell",
@@ -4205,36 +4203,36 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.95"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
+checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79"
dependencies = [
"bumpalo",
"log",
- "once_cell",
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.45"
+version = "0.4.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b"
+checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2"
dependencies = [
"cfg-if",
"js-sys",
+ "once_cell",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.95"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
+checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -4242,28 +4240,28 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.95"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
+checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.95"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
+checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6"
[[package]]
name = "web-sys"
-version = "0.3.72"
+version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112"
+checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -4570,7 +4568,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
"synstructure",
]
@@ -4670,9 +4668,9 @@ dependencies = [
[[package]]
name = "zcash_note_encryption"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b4580cd6cee12e44421dac43169be8d23791650816bdb34e6ddfa70ac89c1c5"
+checksum = "77efec759c3798b6e4d829fcc762070d9b229b0f13338c40bf993b7b609c2272"
dependencies = [
"chacha20",
"chacha20poly1305",
@@ -4777,7 +4775,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -4797,7 +4795,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
"synstructure",
]
@@ -4818,7 +4816,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -4840,7 +4838,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.89",
+ "syn 2.0.90",
]
[[package]]
@@ -4862,7 +4860,7 @@ dependencies = [
[[package]]
name = "zingo-memo"
version = "0.1.0"
-source = "git+https://github.com/zingolabs/zingolib?tag=1.10.2#af354754bbf254aeadf48f057f653c2667c07cdd"
+source = "git+https://github.com/zingolabs/zingolib?branch=dev#f51c7f36b645e2e367ad465c9ec980a53b1757c8"
dependencies = [
"zcash_address",
"zcash_client_backend",
@@ -4874,7 +4872,7 @@ dependencies = [
[[package]]
name = "zingo-netutils"
version = "0.1.0"
-source = "git+https://github.com/zingolabs/zingolib?tag=1.10.2#af354754bbf254aeadf48f057f653c2667c07cdd"
+source = "git+https://github.com/zingolabs/zingolib?branch=dev#f51c7f36b645e2e367ad465c9ec980a53b1757c8"
dependencies = [
"http",
"http-body",
@@ -4886,7 +4884,7 @@ dependencies = [
"thiserror",
"tokio-rustls",
"tonic",
- "tower 0.4.13",
+ "tower 0.5.1",
"webpki-roots 0.25.4",
"zcash_client_backend",
]
@@ -4894,7 +4892,7 @@ dependencies = [
[[package]]
name = "zingo-status"
version = "0.1.0"
-source = "git+https://github.com/zingolabs/zingolib?tag=1.10.2#af354754bbf254aeadf48f057f653c2667c07cdd"
+source = "git+https://github.com/zingolabs/zingolib?branch=dev#f51c7f36b645e2e367ad465c9ec980a53b1757c8"
dependencies = [
"zcash_primitives",
]
@@ -4902,7 +4900,7 @@ dependencies = [
[[package]]
name = "zingo-sync"
version = "0.1.0"
-source = "git+https://github.com/zingolabs/zingolib?tag=1.10.2#af354754bbf254aeadf48f057f653c2667c07cdd"
+source = "git+https://github.com/zingolabs/zingolib?branch=dev#f51c7f36b645e2e367ad465c9ec980a53b1757c8"
dependencies = [
"base58",
"crossbeam-channel",
@@ -4926,12 +4924,13 @@ dependencies = [
"zcash_primitives",
"zingo-memo",
"zingo-netutils",
+ "zip32",
]
[[package]]
name = "zingolib"
version = "0.2.0"
-source = "git+https://github.com/zingolabs/zingolib?tag=1.10.2#af354754bbf254aeadf48f057f653c2667c07cdd"
+source = "git+https://github.com/zingolabs/zingolib?branch=dev#f51c7f36b645e2e367ad465c9ec980a53b1757c8"
dependencies = [
"append-only-vec",
"base58",
@@ -4949,7 +4948,6 @@ dependencies = [
"enum_dispatch",
"ff",
"futures",
- "getset",
"group",
"hex",
"http",
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index 04d00fa7f..157e18c97 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -3,7 +3,7 @@ members = ["lib", "android", "zingomobile_utils"]
resolver = "2"
[workspace.dependencies]
-zingolib = { git = "https://github.com/zingolabs/zingolib", default-features = true, tag = "1.10.2", features = [
+zingolib = { git = "https://github.com/zingolabs/zingolib", default-features = true, branch = "dev", features = [
"test-elevation",
] }
uniffi = "0.27"
@@ -16,7 +16,3 @@ debug = false
[profile.test]
opt-level = 3
debug = false
-
-# this is needed to build for IOS simulator
-#[patch.crates-io]
-#sodiumoxide = { git = "https://github.com/juanky201271/sodiumoxide", rev = "81a777464ee1553c47c61ee9e3a43fda7a3135f1"}
diff --git a/rust/android/Cargo.toml b/rust/android/Cargo.toml
index d97be71b1..6edfea627 100644
--- a/rust/android/Cargo.toml
+++ b/rust/android/Cargo.toml
@@ -12,7 +12,7 @@ regchest = []
zingolib = { workspace = true }
zingomobile_utils = { path = "../zingomobile_utils" }
regchest_utils = { git = "https://github.com/zingolabs/zingo-regchest", default-features = true, branch = "dev" }
-darkside-tests = { git = "https://github.com/zingolabs/zingolib", default-features = true, tag = "1.10.2" }
+darkside-tests = { git = "https://github.com/zingolabs/zingolib", default-features = true, branch = "dev" }
json = "0.12.4"
env_logger = "0.10.0"
tokio = { workspace = true }
diff --git a/rust/lib/src/lib.rs b/rust/lib/src/lib.rs
index 027250367..9c8e739ed 100644
--- a/rust/lib/src/lib.rs
+++ b/rust/lib/src/lib.rs
@@ -48,6 +48,7 @@ fn construct_uri_load_config(
chain_hint: String,
monitor_mempool: bool,
) -> Result<(ZingoConfig, http::Uri), String> {
+ // if uri is empty -> Offline Mode.
let lightwalletd_uri = construct_lightwalletd_uri(Some(uri));
let chaintype = match chain_hint.as_str() {