Skip to content

Commit

Permalink
Merge pull request zingolabs#757 from juanky201271/dev_serverless_mode
Browse files Browse the repository at this point in the history
Offline mode (serverless) & No internet connection mode
  • Loading branch information
juanky201271 authored Dec 9, 2024
2 parents 9a503bd + dd27e98 commit f078e1c
Show file tree
Hide file tree
Showing 46 changed files with 1,494 additions and 1,140 deletions.
3 changes: 0 additions & 3 deletions __mocks__/dataMocks/mockAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
];
4 changes: 4 additions & 0 deletions __tests__/Send.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ describe('Component Send - test', () => {
setScrollToTop={onFunction}
setScrollToBottom={onFunction}
setServerOption={onFunction}
clearTimers={onFunction}
configure={onFunction}
/>
</ContextAppLoadedProvider>,
);
Expand Down Expand Up @@ -130,6 +132,8 @@ describe('Component Send - test', () => {
setScrollToTop={onFunction}
setScrollToBottom={onFunction}
setServerOption={onFunction}
clearTimers={onFunction}
configure={onFunction}
/>
</ContextAppLoadedProvider>,
);
Expand Down
160 changes: 46 additions & 114 deletions __tests__/__snapshots__/Header.snapshot.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
>
<View
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessibilityValue={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
}
}
accessible={true}
collapsable={false}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
{
"margin": 0,
"opacity": 1,
"padding": 0,
}
}
>
<View
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessibilityValue={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
}
}
accessible={true}
collapsable={false}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
<
color="red"
icon={
{
"opacity": 1,
}
}
>
<
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}
/>
</View>
</View>
</View>
<View
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessibilityValue={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
}
}
accessible={true}
collapsable={false}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
{
"opacity": 1,
}
}
>
<
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}
/>
</View>
</View>
</View>
<View
Expand Down Expand Up @@ -231,7 +163,7 @@ exports[`Component Header - test Header Complex - snapshot 1`] = `
"flexDirection": "row",
"justifyContent": "center",
"margin": 0,
"marginHorizontal": 5,
"marginRight": 5,
"minHeight": 25,
"minWidth": 25,
"padding": 0,
Expand Down
Loading

0 comments on commit f078e1c

Please sign in to comment.