Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/onboarding setup #8234

Merged
merged 1 commit into from
Jul 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added android/app/src/main/res/drawable-hdpi/bell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/drawable-mdpi/bell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/drawable-xhdpi/bell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/drawable-xxhdpi/bell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions externs.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ var TopLevel = {
"hide" : function () {},
"i18n" : function () {},
"ignoreWarnings" : function () {},
"importOnboardingAccount": function () {},
"in" : function () {},
"index" : function () {},
"indexOf" : function () {},
Expand Down Expand Up @@ -465,6 +466,7 @@ var TopLevel = {
"StackActions" : function () {},
"start" : function () {},
"startNode" : function () {},
"startOnboarding": function () {},
"state" : function () {},
"Status" : function () {},
"status" : function () {},
Expand Down Expand Up @@ -518,6 +520,7 @@ var TopLevel = {
"verifyPin" : function () {},
"Version" : function () {},
"version" : function () {},
"vibrate" : function () {},
"View" : function () {},
"warn" : function () {},
"Web3" : function () {},
Expand Down
23 changes: 23 additions & 0 deletions ios/StatusIm/Images.xcassets/bell.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "bell_1x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "bell_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "bell_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions ios/StatusIm/Images.xcassets/fingerprint.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "fingerprint_1x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "fingerprint_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "fingerprint_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,44 @@ public void run() {
StatusThreadPoolExecutor.getInstance().execute(r);
}

@ReactMethod
public void startOnboarding(final Integer n, final Integer mnemonicLength, final Callback callback) {
Log.d(TAG, "startOnboarding");
if (!checkAvailability()) {
callback.invoke(false);
return;
}
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.startOnboarding(n, mnemonicLength);

callback.invoke(res);
}
};

StatusThreadPoolExecutor.getInstance().execute(r);
}

@ReactMethod
public void importOnboardingAccount(final String id, final String password, final Callback callback) {
Log.d(TAG, "importOnboardingAccount");
if (!checkAvailability()) {
callback.invoke(false);
return;
}
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.importOnboardingAccount(id, password);

callback.invoke(res);
}
};

StatusThreadPoolExecutor.getInstance().execute(r);
}

private String createIdentifier() {
return UUID.randomUUID().toString();
}
Expand Down
24 changes: 24 additions & 0 deletions modules/react-native-status/ios/RCTStatus/RCTStatus.m
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,29 @@ - (void)handleSignal:(NSString *)signal
callback(@[result]);
}

//////////////////////////////////////////////////////////////////// startOnboarding
RCT_EXPORT_METHOD(startOnboarding:(NSInteger)n
password:(NSInteger)mnemonicLength
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"StartOnboarding() method called");
#endif
NSString *result = StatusgoStartOnboarding(n, mnemonicLength);
callback(@[result]);
}

//////////////////////////////////////////////////////////////////// importOnboardingAccount
RCT_EXPORT_METHOD(importOnboardingAccount:(NSString *)id
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"ImportOnboardingAccount() method called");
#endif
NSString *result = StatusgoImportOnboardingAccount(id, password);
callback(@[result]);
}


//////////////////////////////////////////////////////////////////// login
RCT_EXPORT_METHOD(login:(NSString *)address
password:(NSString *)password
Expand Down Expand Up @@ -449,6 +472,7 @@ - (void)handleSignal:(NSString *)signal
RCT_EXPORT_METHOD(clearCookies) {
NSHTTPCookie *cookie;
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];

for (cookie in [storage cookies]) {
[storage deleteCookie:cookie];
}
Expand Down
Binary file added resources/images/ui/intro1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/ui/intro2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/ui/intro3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/ui/sample-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading