Fix max pool transfer (again)

This commit is contained in:
Hanh 2022-12-12 03:54:13 +08:00
parent 88b50bb269
commit 2c99d409f6
3 changed files with 5 additions and 4 deletions

View File

@ -109,9 +109,10 @@ class PoolsState extends State<PoolsPage> {
if (form.validate()) {
form.save();
final amount = _amountKey.currentState?.amount ?? 0;
final includeFee = _amountKey.currentState?.feeIncluded ?? false;
try {
final txPlan = await WarpApi.transferPools(active.coin, active.id, 1 << _fromPool, 1 << _toPool, amount,
_memoController.text, stringToAmount(_maxAmountController.text), settings.anchorOffset);
includeFee, _memoController.text, stringToAmount(_maxAmountController.text), settings.anchorOffset);
Navigator.of(context).pushReplacementNamed('/txplan', arguments: txPlan);
}
on String catch (message) {

View File

@ -211,9 +211,9 @@ class WarpApi {
}
static Future<String> transferPools(int coin, int account, int fromPool, int toPool,
int amount, String memo, int splitAmount, int anchorOffset) async {
int amount, bool includeFee, String memo, int splitAmount, int anchorOffset) async {
final txId = await compute(transferPoolsIsolateFn, TransferPoolsParams(coin, account, fromPool, toPool, amount,
false, memo, splitAmount, anchorOffset));
includeFee, memo, splitAmount, anchorOffset));
return txId;
}

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.2.17+319
version: 1.2.17+320
environment:
sdk: ">=2.12.0 <3.0.0"