mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
Flutter upgrade
This commit is contained in:
@@ -3,9 +3,10 @@ import 'package:ffi/ffi.dart';
|
||||
|
||||
class AccountRow extends Struct {
|
||||
@Int64()
|
||||
int id;
|
||||
Pointer<Utf8> label;
|
||||
external int id;
|
||||
|
||||
external Pointer<Utf8> label;
|
||||
|
||||
String getLabel() => Utf8.fromUtf8(label);
|
||||
String getLabel() => label.toDartString();
|
||||
int getId() => id;
|
||||
}
|
||||
|
||||
@@ -3,9 +3,10 @@ import 'package:ffi/ffi.dart';
|
||||
|
||||
class HavenBalanceRow extends Struct {
|
||||
@Int64()
|
||||
int amount;
|
||||
Pointer<Utf8> assetType;
|
||||
external int amount;
|
||||
|
||||
external Pointer<Utf8> assetType;
|
||||
|
||||
int getAmount() => amount;
|
||||
String getAssetType() => Utf8.fromUtf8(assetType);
|
||||
String getAssetType() => assetType.toDartString();
|
||||
}
|
||||
|
||||
@@ -3,9 +3,10 @@ import 'package:ffi/ffi.dart';
|
||||
|
||||
class HavenRate extends Struct {
|
||||
@Int64()
|
||||
int rate;
|
||||
Pointer<Utf8> assetType;
|
||||
external int rate;
|
||||
|
||||
external Pointer<Utf8> assetType;
|
||||
|
||||
int getRate() => rate;
|
||||
String getAssetType() => Utf8.fromUtf8(assetType);
|
||||
String getAssetType() => assetType.toDartString();
|
||||
}
|
||||
|
||||
@@ -3,18 +3,22 @@ import 'package:ffi/ffi.dart';
|
||||
|
||||
class PendingTransactionRaw extends Struct {
|
||||
@Int64()
|
||||
int amount;
|
||||
external int amount;
|
||||
|
||||
@Int64()
|
||||
int fee;
|
||||
external int fee;
|
||||
|
||||
Pointer<Utf8> hash;
|
||||
external Pointer<Utf8> hash;
|
||||
|
||||
String getHash() => Utf8.fromUtf8(hash);
|
||||
String getHash() => hash.toDartString();
|
||||
}
|
||||
|
||||
class PendingTransactionDescription {
|
||||
PendingTransactionDescription({this.amount, this.fee, this.hash, this.pointerAddress});
|
||||
PendingTransactionDescription({
|
||||
required this.amount,
|
||||
required this.fee,
|
||||
required this.hash,
|
||||
required this.pointerAddress});
|
||||
|
||||
final int amount;
|
||||
final int fee;
|
||||
|
||||
@@ -3,11 +3,13 @@ import 'package:ffi/ffi.dart';
|
||||
|
||||
class SubaddressRow extends Struct {
|
||||
@Int64()
|
||||
int id;
|
||||
Pointer<Utf8> address;
|
||||
Pointer<Utf8> label;
|
||||
external int id;
|
||||
|
||||
external Pointer<Utf8> address;
|
||||
|
||||
external Pointer<Utf8> label;
|
||||
|
||||
String getLabel() => Utf8.fromUtf8(label);
|
||||
String getAddress() => Utf8.fromUtf8(address);
|
||||
String getLabel() => label.toDartString();
|
||||
String getAddress() => address.toDartString();
|
||||
int getId() => id;
|
||||
}
|
||||
@@ -3,42 +3,42 @@ import 'package:ffi/ffi.dart';
|
||||
|
||||
class TransactionInfoRow extends Struct {
|
||||
@Uint64()
|
||||
int amount;
|
||||
external int amount;
|
||||
|
||||
@Uint64()
|
||||
int fee;
|
||||
external int fee;
|
||||
|
||||
@Uint64()
|
||||
int blockHeight;
|
||||
external int blockHeight;
|
||||
|
||||
@Uint64()
|
||||
int confirmations;
|
||||
external int confirmations;
|
||||
|
||||
@Uint32()
|
||||
int subaddrAccount;
|
||||
external int subaddrAccount;
|
||||
|
||||
@Int8()
|
||||
int direction;
|
||||
external int direction;
|
||||
|
||||
@Int8()
|
||||
int isPending;
|
||||
external int isPending;
|
||||
|
||||
@Uint32()
|
||||
int subaddrIndex;
|
||||
external int subaddrIndex;
|
||||
|
||||
Pointer<Utf8> hash;
|
||||
external Pointer<Utf8> hash;
|
||||
|
||||
Pointer<Utf8> paymentId;
|
||||
external Pointer<Utf8> paymentId;
|
||||
|
||||
Pointer<Utf8> assetType;
|
||||
external Pointer<Utf8> assetType;
|
||||
|
||||
@Int64()
|
||||
int datetime;
|
||||
external int datetime;
|
||||
|
||||
int getDatetime() => datetime;
|
||||
int getAmount() => amount >= 0 ? amount : amount * -1;
|
||||
bool getIsPending() => isPending != 0;
|
||||
String getHash() => Utf8.fromUtf8(hash);
|
||||
String getPaymentId() => Utf8.fromUtf8(paymentId);
|
||||
String getAssetType() => Utf8.fromUtf8(assetType);
|
||||
String getHash() => hash.toDartString();
|
||||
String getPaymentId() => paymentId.toDartString();
|
||||
String getAssetType() => assetType.toDartString();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'dart:ffi';
|
||||
import 'package:ffi/ffi.dart';
|
||||
|
||||
class Utf8Box extends Struct {
|
||||
Pointer<Utf8> value;
|
||||
external Pointer<Utf8> value;
|
||||
|
||||
String getValue() => Utf8.fromUtf8(value);
|
||||
String getValue() => value.toDartString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user