Merge pull request #725 from cypherstack/firo_mobile_fix

Firo mobile fix
This commit is contained in:
julian-CStack 2024-01-19 15:37:27 -06:00 committed by GitHub
commit 0e0b516ea0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 55 additions and 10 deletions

View file

@ -457,18 +457,57 @@ class _NewWalletRecoveryPhraseWarningViewState
);
},
));
String? otherDataJsonString;
if (widget.coin == Coin.tezos) {
otherDataJsonString = jsonEncode({
WalletInfoKeys.tezosDerivationPath:
Tezos.standardDerivationPath.value,
});
// }//todo: probably not needed (broken anyways)
// else if (widget.coin == Coin.epicCash) {
// final int secondsSinceEpoch =
// DateTime.now().millisecondsSinceEpoch ~/ 1000;
// const int epicCashFirstBlock = 1565370278;
// const double overestimateSecondsPerBlock = 61;
// int chosenSeconds = secondsSinceEpoch - epicCashFirstBlock;
// int approximateHeight = chosenSeconds ~/ overestimateSecondsPerBlock;
// /
// // debugPrint(
// // "approximate height: $approximateHeight chosen_seconds: $chosenSeconds");
// height = approximateHeight;
// if (height < 0) {
// height = 0;
// }
//
// otherDataJsonString = jsonEncode(
// {
// WalletInfoKeys.epiccashData: jsonEncode(
// ExtraEpiccashWalletInfo(
// receivingIndex: 0,
// changeIndex: 0,
// slatesToAddresses: {},
// slatesToCommits: {},
// lastScannedBlock: epicCashFirstBlock,
// restoreHeight: height,
// creationHeight: height,
// ).toMap(),
// ),
// },
// );
} else if (widget.coin == Coin.firo) {
otherDataJsonString = jsonEncode(
{
WalletInfoKeys
.lelantusCoinIsarRescanRequired:
false,
},
);
}
final info = WalletInfo.createNew(
coin: widget.coin,
name: widget.walletName,
otherDataJsonString: coin == Coin.tezos
? jsonEncode({
WalletInfoKeys
.tezosDerivationPath:
Tezos.standardDerivationPath
.value,
})
: null,
otherDataJsonString: otherDataJsonString,
);
var node = ref

View file

@ -250,6 +250,12 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
),
},
);
} else if (widget.coin == Coin.firo) {
otherDataJsonString = jsonEncode(
{
WalletInfoKeys.lelantusCoinIsarRescanRequired: false,
},
);
}
// TODO: do actual check to make sure it is a valid mnemonic for monero

View file

@ -6,7 +6,7 @@ set -e
source ../rust_version.sh
set_rust_to_1671
mkdir build
mkdir -p build
. ./config.sh
./install_ndk.sh

View file

@ -1,6 +1,6 @@
#!/bin/sh
mkdir build
mkdir -p build
. ./config.sh
TOOLCHAIN_DIR=${WORKDIR}/toolchain
ANDROID_NDK_SHA256="8381c440fe61fcbb01e209211ac01b519cd6adf51ab1c2281d5daad6ca4c8c8c"