Merge remote-tracking branch 'origin_SW/staging' into ui-fixes

This commit is contained in:
julian 2023-04-10 16:19:42 -06:00
commit 8d9dec9661
3 changed files with 32 additions and 6 deletions

View file

@ -47,12 +47,18 @@ Install [Rust](https://www.rust-lang.org/tools/install)
cargo install cargo-ndk
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
```
Linux desktop specific dependencies:
```
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev meson python3-pip libgirepository1.0-dev valac xsltproc docbook-xsl
pip3 install --upgrade meson==0.64.1 markdown==3.4.1 markupsafe==2.1.1 jinja2==3.1.2 pygments==2.13.0 toml==0.10.2 typogrify==2.0.7 tomli==2.0.1
```
After installing the prerequisites listed above, download the code and init the submodules
```
git clone https://github.com/cypherstack/stack_wallet.git
cd stack_wallet
git submodule update --init --recursive
```
Run prebuild script

View file

@ -539,13 +539,15 @@ class _ConfirmTransactionViewState
),
Builder(
builder: (context) {
final amount =
transactionInfo["recipientAmt"] as Amount;
final coin = ref.watch(
managerProvider.select(
(value) => value.coin,
),
);
final amount = Amount(
rawValue: BigInt.from(
transactionInfo["recipientAmt"] as int),
fractionDigits: coin.decimals);
final externalCalls = ref.watch(
prefsChangeNotifierProvider.select(
(value) => value.externalCalls));
@ -922,7 +924,10 @@ class _ConfirmTransactionViewState
localeServiceChangeNotifierProvider
.select((value) => value.locale),
);
final amount = transactionInfo["recipientAmt"] as Amount;
final amount = Amount(
rawValue: BigInt.from(
transactionInfo["recipientAmt"] as int),
fractionDigits: coin.decimals);
return Text(
"${(amount + fee).localizedStringAsFixed(
locale: locale,

View file

@ -914,8 +914,16 @@ class FiroWallet extends CoinServiceAPI
type: isar_models.TransactionType.outgoing,
subType: isar_models.TransactionSubType.none,
// precision may be lost here hence the following amountString
amount: (txData["recipientAmt"] as Amount).raw.toInt(),
amountString: (txData["recipientAmt"] as Amount).toJsonString(),
amount: Amount(
rawValue: BigInt.from(txData["recipientAmt"] as int),
fractionDigits: coin.decimals)
.raw
.toInt(),
amountString: Amount(
rawValue: BigInt.from(txData["recipientAmt"] as int),
fractionDigits: coin.decimals)
.raw
.toString(),
fee: txData["fee"] as int,
height: null,
isCancelled: false,
@ -2413,7 +2421,14 @@ class FiroWallet extends CoinServiceAPI
if (!jindexes!.contains(lelantusCoinsList[i].index) &&
transactions
.where((e) => e.txid == lelantusCoinsList[i].txId)
.isEmpty) {
.isEmpty &&
!(lelantusTransactionsd
.where((e) => e.txid == lelantusCoinsList[i].txId)
.isNotEmpty &&
lelantusTransactionsd
.where((e) => e.txid == lelantusCoinsList[i].txId)
.first
.isConfirmed(currentChainHeight, MINIMUM_CONFIRMATIONS))) {
isUnconfirmed = true;
}