Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
adding UTC timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
ggilchrist-ledger committed Apr 28, 2022
1 parent 13bcadd commit 1f40ece
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/detox-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
adb logcat *:E &
$ANDROID_HOME/platform-tools/adb devices
adb shell getprop persist.sys.timezone
adb shell setprop persist.sys.timezone "Europe/Paris"
adb shell setprop persist.sys.timezone
yarn e2e:test -c android.staging e2e/specs/onboarding.spec.js --loglevel trace --record-logs failing --record-timeline all --take-screenshots failing
# yarn start & yarn detox test -c android.debug --loglevel verbose --record-logs failing --record-timeline all --take-screenshots failing
# mkdir ./temp
Expand Down
4 changes: 3 additions & 1 deletion e2e/bridge/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ async function onMessage(event: { data: mixed }) {
switch (msg.type) {
case "add":
case "open":
case "receive":
e2eBridgeSubject.next(msg);
break;
case "setGlobals":
Expand Down Expand Up @@ -71,7 +72,8 @@ type Message<T: string, P = any> = {

type E2EBridgeSubjectMessage =
| Message<"add", { id: string, name: string }>
| Message<"open", ?*>;
| Message<"open", ?*>
| Message<"receive", { address: string, path: string }>;

export type E2EBridgeMessage =
| E2EBridgeSubjectMessage
Expand Down
7 changes: 7 additions & 0 deletions e2e/bridge/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ export function open() {
postMessage({ type: "open", payload: null });
}

export function receive() {
postMessage({
type: "receive",
payload: { address: "1234wtf1234wtfomggggggggggg", path: "mypathlol" },
});
}

function onMessage(messageStr: string) {
const msg = JSON.parse(messageStr);
log(`Message\n${JSON.stringify(msg, null, 2)}`);
Expand Down
10 changes: 8 additions & 2 deletions src/screens/ReceiveFunds/03-Confirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import React, { useCallback, useEffect, useRef, useState } from "react";
import { of } from "rxjs";
import { delay } from "rxjs/operators";
import { delay, filter, map } from "rxjs/operators";
import { View, StyleSheet, Platform } from "react-native";
import { useSelector } from "react-redux";
import QRCode from "react-native-qrcode-svg";
Expand Down Expand Up @@ -44,6 +44,7 @@ import logger from "../../logger";
import { rejectionOp } from "../../logic/debugReject";
import { getStackNavigatorConfig } from "../../navigation/navigatorConfig";
import GenericErrorView from "../../components/GenericErrorView";
import { e2eBridgeSubject } from "../../../e2e/bridge/client";

type Props = {
account: ?(TokenAccount | Account),
Expand Down Expand Up @@ -85,7 +86,12 @@ export default function ReceiveConfirmation({ navigation, route }: Props) {

sub.current = (mainAccount.id.startsWith("mock")
? // $FlowFixMe
of({}).pipe(delay(1000), rejectionOp())
// of({}).pipe(delay(1000), rejectionOp())

e2eBridgeSubject.pipe(
filter(msg => msg.type === "receive"),
map(msg => msg.payload),
)
: getAccountBridge(mainAccount).receive(mainAccount, {
deviceId: device.deviceId,
verify: true,
Expand Down

0 comments on commit 1f40ece

Please sign in to comment.