Skip to content

Mobile UI Improvements #892

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

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft
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
10 changes: 5 additions & 5 deletions android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<manifest package="mw.mwc.wallet" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.2" android:versionCode="1" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31"/>
<manifest package="mw.mwc.wallet" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:versionName="0.2" android:versionCode="1" android:installLocation="auto">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="31"/>

<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Expand All @@ -16,7 +16,7 @@

<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>

<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="MWC Mobile" android:extractNativeLibs="true" android:icon="@drawable/icon">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="MWC Mobile" android:extractNativeLibs="true" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:exported="true" android:label="MWC Mobile" android:screenOrientation="portrait" android:launchMode="singleTop" android:textAllCaps="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand Down Expand Up @@ -61,7 +61,7 @@
application still try to draw after
"applicationStateChanged(Qt::ApplicationSuspended)"
signal is sent! -->
<meta-data android:name="android.app.background_running" android:value="false"/>
<meta-data android:name="android.app.background_running" android:value="true"/>
<!-- Background running -->
<!-- auto screen scale factor -->
<meta-data android:name="android.app.auto_screen_scale_factor" android:value="false"/>
Expand All @@ -73,7 +73,7 @@
* minimal - useful for Quick Controls 2 apps, it is much faster than "full"
* none - useful for apps that don't use any of the above Qt modules
-->
<meta-data android:name="android.app.extract_android_style" android:value="default"/>
<meta-data android:name="android.app.extract_android_style" android:value="minimal"/>
<!-- extract android style -->
</activity>
<!-- For adding service(s) please check: https://wiki.qt.io/AndroidServices -->
Expand Down
7 changes: 5 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ apply plugin: 'com.android.application'

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation 'com.android.support:support-v4:23.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation "android.arch.lifecycle:extensions:1.1.1"

}

android {
Expand All @@ -37,7 +40,7 @@ android {

compileSdkVersion androidCompileSdkVersion.toInteger()

buildToolsVersion '28.0.3'
//buildToolsVersion '28.0.3'

sourceSets {
main {
Expand Down
1 change: 1 addition & 0 deletions android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

rem -Dorg.gradle.project.android.useAndroidX=true -Dorg.gradle.project.android.enableJetifier=true
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
Expand Down
16 changes: 16 additions & 0 deletions android/res/drawable-anydpi/ic_action_name.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF"
android:alpha="0.8">
<group android:scaleX="0.024"
android:scaleY="0.024"
android:translateY="6">
<path
android:pathData="M241.54 11.89c22.57 0.41 42.11 8.4 58.2 24.47q71.1 71 142.17 142.08a81 81 0 0 0 48.24 23.62c28.93 3.63 52.4 -7.72 72.25 -27.35q69 -68.22 137.23 -137.12c16.84 -16.88 36.93 -25.9 60.85 -25.54 22 0.32 40.94 8.48 56.48 24 52 51.89 104.19 103.7 155.86 156 33 33.38 32.5 83.26 -0.61 116.54Q895.14 386 817.71 463.05c-33.52 33.39 -83.67 33.33 -117.26 -0.11q-69.63 -69.31 -139 -138.92c-12.27 -12.3 -26.63 -20.92 -43.46 -25 -23.8 -5.85 -45.38 0.13 -64.93 13.93a159.23 159.23 0 0 0 -20 17.29Q367 396 301.19 462c-34.67 34.69 -84.74 34.61 -119.44 -0.12q-76 -76 -152.06 -152c-17 -16.95 -26.2 -37 -25.87 -61.21 0.29 -21.27 7.68 -39.81 22.45 -55 17.06 -17.59 34.53 -34.77 51.85 -52.1Q130.42 89.21 182.77 36.9C199 20.69 218.49 12.37 241.54 11.89Z"
android:fillColor="#FFFFFF" />
</group>
</vector>
Binary file added android/res/drawable-hdpi/ic_action_name.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 removed android/res/drawable-hdpi/icon.png
Binary file not shown.
Binary file removed android/res/drawable-ldpi/icon.png
Binary file not shown.
Binary file added android/res/drawable-mdpi/ic_action_name.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 removed android/res/drawable-mdpi/icon.png
Binary file not shown.
30 changes: 30 additions & 0 deletions android/res/drawable-v24/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="1.08"
android:scaleY="1.08">
<path
android:pathData="M0,0h500v500h-500z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="0"
android:startX="0"
android:endY="0"
android:endX="100"
android:type="linear">
<item android:offset="0" android:color="#FF3700C9"/>
<item android:offset="0.14285715" android:color="#FF4A00CE"/>
<item android:offset="0.2857143" android:color="#FF5A00D2"/>
<item android:offset="0.42857143" android:color="#FF6900D6"/>
<item android:offset="0.5714286" android:color="#FF7700DB"/>
<item android:offset="0.71428573" android:color="#FF8400DF"/>
<item android:offset="0.85714287" android:color="#FF9100E3"/>
<item android:offset="1" android:color="#FF9D00E7"/>
</gradient>
</aapt:attr>
</path>
</group>
</vector>
Binary file added android/res/drawable-xhdpi/ic_action_name.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 android/res/drawable-xxhdpi/ic_action_name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions android/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.04752"
android:scaleY="0.04752"
android:translateX="30.24"
android:translateY="42.12">
<path
android:pathData="M241.54,11.89c22.57,0.41 42.11,8.4 58.2,24.47q71.1,71 142.17,142.08a81,81 0,0 0,48.24 23.62c28.93,3.63 52.4,-7.72 72.25,-27.35q69,-68.22 137.23,-137.12c16.84,-16.88 36.93,-25.9 60.85,-25.54 22,0.32 40.94,8.48 56.48,24 52,51.89 104.19,103.7 155.86,156 33,33.38 32.5,83.26 -0.61,116.54Q895.14,386 817.71,463.05c-33.52,33.39 -83.67,33.33 -117.26,-0.11q-69.63,-69.31 -139,-138.92c-12.27,-12.3 -26.63,-20.92 -43.46,-25 -23.8,-5.85 -45.38,0.13 -64.93,13.93a159.23,159.23 0,0 0,-20 17.29Q367,396 301.19,462c-34.67,34.69 -84.74,34.61 -119.44,-0.12q-76,-76 -152.06,-152c-17,-16.95 -26.2,-37 -25.87,-61.21 0.29,-21.27 7.68,-39.81 22.45,-55 17.06,-17.59 34.53,-34.77 51.85,-52.1Q130.42,89.21 182.77,36.9C199,20.69 218.49,12.37 241.54,11.89Z"
android:fillColor="#fff"/>
</group>
</vector>
9 changes: 9 additions & 0 deletions android/res/drawable/ic_mwc_logo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1000dp"
android:height="500dp"
android:viewportWidth="1000"
android:viewportHeight="500">
<path
android:pathData="M241.54,11.89c22.57,0.41 42.11,8.4 58.2,24.47q71.1,71 142.17,142.08a81,81 0,0 0,48.24 23.62c28.93,3.63 52.4,-7.72 72.25,-27.35q69,-68.22 137.23,-137.12c16.84,-16.88 36.93,-25.9 60.85,-25.54 22,0.32 40.94,8.48 56.48,24 52,51.89 104.19,103.7 155.86,156 33,33.38 32.5,83.26 -0.61,116.54Q895.14,386 817.71,463.05c-33.52,33.39 -83.67,33.33 -117.26,-0.11q-69.63,-69.31 -139,-138.92c-12.27,-12.3 -26.63,-20.92 -43.46,-25 -23.8,-5.85 -45.38,0.13 -64.93,13.93a159.23,159.23 0,0 0,-20 17.29Q367,396 301.19,462c-34.67,34.69 -84.74,34.61 -119.44,-0.12q-76,-76 -152.06,-152c-17,-16.95 -26.2,-37 -25.87,-61.21 0.29,-21.27 7.68,-39.81 22.45,-55 17.06,-17.59 34.53,-34.77 51.85,-52.1Q130.42,89.21 182.77,36.9C199,20.69 218.49,12.37 241.54,11.89Z"
android:fillColor="#fff"/>
</vector>
5 changes: 5 additions & 0 deletions android/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions android/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file added android/res/mipmap-hdpi/ic_launcher.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 android/res/mipmap-hdpi/ic_launcher_round.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 android/res/mipmap-mdpi/ic_launcher.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 android/res/mipmap-mdpi/ic_launcher_round.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 android/res/mipmap-xhdpi/ic_launcher.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 android/res/mipmap-xhdpi/ic_launcher_round.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 android/res/mipmap-xxhdpi/ic_launcher.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 android/res/mipmap-xxhdpi/ic_launcher_round.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 android/res/mipmap-xxxhdpi/ic_launcher.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 android/res/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 54 additions & 2 deletions android/src/mw/mwc/wallet/ActivityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,20 @@
import android.os.PowerManager;
import android.provider.Settings;
import android.net.Uri;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.ContextCompat;
import android.widget.Toast;
import android.content.pm.PackageManager;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.graphics.Color;
import android.graphics.BitmapFactory;
import android.media.RingtoneManager;
import android.app.Service;



// import java.util.Timer;
// import java.util.TimerTask;

Expand All @@ -24,6 +35,7 @@ public class ActivityUtils {

private static final String TAG = "mwc-qt-wallet";
public static final String BROADCAST_ACTION = "mw.mwc.wallet.broadcast";
private static int IMPORTANCE_FOREGROUND = 0x00000064;

public void registerServiceBroadcastReceiver(Context context) {
IntentFilter intentFilter = new IntentFilter();
Expand All @@ -33,7 +45,7 @@ public void registerServiceBroadcastReceiver(Context context) {

checkPermission(context, android.Manifest.permission.WRITE_EXTERNAL_STORAGE, 100);
checkPermission(context, android.Manifest.permission.READ_EXTERNAL_STORAGE, 100);

/* // Requesting permissions
Intent intent = new Intent();
String packageName = context.getPackageName();
Expand All @@ -60,6 +72,46 @@ public void checkPermission(Context context, String permission, int requestCode)
}
}

public void notify(Context context, String message) {
try {
ActivityManager.RunningAppProcessInfo appProcessInfo = new ActivityManager.RunningAppProcessInfo();
ActivityManager.getMyMemoryState(appProcessInfo);
if (appProcessInfo.importance == IMPORTANCE_FOREGROUND) {
Log.i(TAG, "Wallet in Foreground, not sending notification");
return;
}

NotificationManager m_notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);

Notification.Builder m_builder;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
int importance = NotificationManager.IMPORTANCE_HIGH;
NotificationChannel notificationChannel = new NotificationChannel("MWC", "MWC Notifier", importance);
m_notificationManager.createNotificationChannel(notificationChannel);
m_builder = new Notification.Builder(context, notificationChannel.getId());
} else {
m_builder = new Notification.Builder(context);
}
m_builder.setSmallIcon(R.drawable.icon)
//.setLargeIcon(BitmapFactory.decodeResource(context.getResources(), R.drawable.icon))
.setContentTitle("MWC Wallet")
.setContentText(message)
.setDefaults(Notification.DEFAULT_SOUND)
.setColor(Color.BLUE)
.setAutoCancel(true)
.setContentIntent(PendingIntent.getActivity(
context,
0,
context.getPackageManager().getLaunchIntentForPackage("mw.mwc.wallet"),
PendingIntent.FLAG_MUTABLE));

m_notificationManager.notify(0, m_builder.build());
Log.i(TAG, "Notification sent");
} catch (Exception e) {
e.printStackTrace();
}
}

private BroadcastReceiver serviceMessageReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Expand Down
Binary file added android_bin/arm64-v8a/libcrypto_1_1.so
Binary file not shown.
Binary file modified android_bin/arm64-v8a/libmwc713.so
Binary file not shown.
Binary file modified android_bin/arm64-v8a/libmwczip.so
Binary file not shown.
Binary file added android_bin/arm64-v8a/libssl_1_1.so
Binary file not shown.
Binary file added android_bin/armeabi-v7a/libcrypto_1_1.so
Binary file not shown.
Binary file added android_bin/armeabi-v7a/libssl_1_1.so
Binary file not shown.
Binary file added android_bin/x86/libcrypto_1_1.so
Binary file not shown.
Binary file added android_bin/x86/libssl_1_1.so
Binary file not shown.
Binary file added android_bin/x86_64/libcrypto_1_1.so
Binary file not shown.
Binary file modified android_bin/x86_64/libmwc713.so
Binary file not shown.
Binary file modified android_bin/x86_64/libmwczip.so
Binary file not shown.
Binary file added android_bin/x86_64/libssl_1_1.so
Binary file not shown.
10 changes: 9 additions & 1 deletion bridge/util_b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
#include "../util/Json.h"
#include "../util/filedialog.h"
#include "../util/Files.h"
#ifdef WALLET_MOBILE
#include "../core_mobile/qtandroidservice.h"
#endif

namespace bridge {

Expand Down Expand Up @@ -164,13 +167,18 @@ using namespace qrcodegen;
// res[0] - size of the QR code
// res[1] - SVG string that can draw the QR code. Seems like both Desctop and QML can draw the SVG path.
QVector<QString> Util::generateQrCode(QString content) {
const QrCode qrCodeResult = QrCode::encodeText(content.toStdString().c_str(), QrCode::Ecc::MEDIUM);
const QrCode qrCodeResult = QrCode::encodeText(content.toStdString().c_str(), QrCode::Ecc::HIGH);

int size = qrCodeResult.getSize();
QString svgContent = QString::fromStdString( qrCodeResult.toSvgString(1) );
return { QString::number(size), svgContent };
}
#ifdef WALLET_MOBILE

void Util::setBarAndroid(int statusBarColor, int navigationBarColor, int statusBarWindows ) {
androidDevice->setBarAndroid(statusBarColor, navigationBarColor, statusBarWindows);
}
#endif
// Parsing slate as a Json. Respond back with error or with Slate details
// slateContent - slate sjon string to parse.
// fileTransactionType - value of FileTransactionType
Expand Down
9 changes: 9 additions & 0 deletions bridge/util_b.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#include <QVector>
#include <QStringList>

#ifdef WALLET_MOBILE
class QtAndroidService;
#endif

namespace util {
class PasswordAnalyser;
}
Expand Down Expand Up @@ -116,6 +120,8 @@ Q_OBJECT
// Extract PubKey from address
Q_INVOKABLE QString extractPubKeyFromAddress(QString address);

Q_INVOKABLE void setBarAndroid(int statusBarColor, int navigationBarColor, int statusBarWindows );

// convert nano items to dtirng that represent that fraction as a double
Q_INVOKABLE QString nano2one(int64_t nano);

Expand All @@ -126,6 +132,9 @@ Q_OBJECT
QVector<double> passwordAnalyserWeight;
QStringList passwordAnalyserSeqWords;
QStringList passwordAnalyserDictWords;
#ifdef WALLET_MOBILE
QtAndroidService * androidDevice = nullptr;
#endif
};

}
Expand Down
26 changes: 24 additions & 2 deletions bridge/wallet_b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,24 @@ QString Wallet::getTotalMwcAmount() {

int64_t mwcSum = 0;
for ( const auto & ai : balance ) {
mwcSum += ai.total;
mwcSum += ai.currentlySpendable;
}

return util::trimStrAsDouble( util::nano2one(mwcSum), 5);
}

// return Total MWC amount as String
QString Wallet::getSpendableMwcAmount() {
QVector<wallet::AccountInfo> balance = getWallet()->getWalletBalance();

int64_t mwcSum = 0;
for ( const auto & ai : balance ) {
mwcSum += ai.currentlySpendable;
}

return util::trimStrAsDouble( util::nano2one(mwcSum), 5);
}

// return Unconfirmed MWC amount as String
QString Wallet::getUnconfirmedAmount() {
QVector<wallet::AccountInfo> balance = getWallet()->getWalletBalance();

Expand All @@ -329,6 +340,17 @@ QString Wallet::getUnconfirmedAmount() {
return util::trimStrAsDouble( util::nano2one(mwcSum), 5);
}

QString Wallet::getLockedMwcAmount() {
QVector<wallet::AccountInfo> balance = getWallet()->getWalletBalance();

int64_t mwcSum = 0;
for ( const auto & ai : balance ) {
mwcSum += ai.lockedByPrevTransaction;
}

return util::trimStrAsDouble( util::nano2one(mwcSum), 5);
}

// Get MQS address and index
// Return: signal sgnMwcAddressWithIndex
void Wallet::requestMqsAddress() {
Expand Down
7 changes: 7 additions & 0 deletions bridge/wallet_b.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ class Wallet : public QObject {
// return Total MWC amount as String. Formatted for GUI
Q_INVOKABLE QString getTotalMwcAmount();

// return Spendable MWC amount as String. Formatted for GUI
Q_INVOKABLE QString getSpendableMwcAmount();

// return Locked MWC amount as String. Formatted for GUI
Q_INVOKABLE QString getLockedMwcAmount();


// return Unconfirmed MWC amount as String. Formatted for GUI
// Empty string if there are no unconfirmed coins
Q_INVOKABLE QString getUnconfirmedAmount();
Expand Down
4 changes: 2 additions & 2 deletions bridge/wnd/a_initaccount_b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ void InitAccount::createWalletWithSeed(QVector<QString> seed) {

// newWalletChoice: see values at state::InitAccount::NEW_WALLET_CHOICE
// network: see values at state::InitAccount::MWC_NETWORK
void InitAccount::submitWalletCreateChoices(int network, QString newInstanceName) {
getState()->submitWalletCreateChoices( state::InitAccount::MWC_NETWORK(network), newInstanceName);
void InitAccount::submitWalletCreateChoices(int network, QString newInstanceName, int lenghtSeed) {
getState()->submitWalletCreateChoices( state::InitAccount::MWC_NETWORK(network), newInstanceName, state::InitAccount::SEED_LENGHT(lenghtSeed));
}


Expand Down
2 changes: 1 addition & 1 deletion bridge/wnd/a_initaccount_b.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Q_OBJECT

// network: see values at state::InitAccount::MWC_NETWORK
// newInstanceName: Name of the new wallet instance
Q_INVOKABLE void submitWalletCreateChoices(int network, QString newInstanceName);
Q_INVOKABLE void submitWalletCreateChoices(int network, QString newInstanceName, int lenghtSeed);

};

Expand Down
4 changes: 2 additions & 2 deletions bridge/wnd/c_newseed_b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ void NewSeed::doneWithNewSeed() {
}

// Submit a new word from the user input
Q_INVOKABLE void NewSeed::submitSeedWord(QString word) {
getState()->submitSeedWord(word);
Q_INVOKABLE void NewSeed::submitSeedWord(QVector<QString> testSeedInput, bool skip) {
getState()->submitSeedWord(testSeedInput, skip);
}

// Restart seed verification
Expand Down
2 changes: 1 addition & 1 deletion bridge/wnd/c_newseed_b.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Q_OBJECT
Q_INVOKABLE void doneWithNewSeed();

// Submit a new word from the user input
Q_INVOKABLE void submitSeedWord(QString word);
Q_INVOKABLE void submitSeedWord(QVector<QString> testWordsInput, bool skip);

// Restart seed verification
Q_INVOKABLE void restartSeedVerification();
Expand Down
Loading