Save Raw Tx
This commit is contained in:
parent
ea7cf8a17f
commit
113229677e
|
@ -260,6 +260,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"Protect Send setting changed"),
|
||||
"purple": MessageLookupByLibrary.simpleMessage("Purple"),
|
||||
"qty": MessageLookupByLibrary.simpleMessage("Qty"),
|
||||
"rawTransaction":
|
||||
MessageLookupByLibrary.simpleMessage("Raw Transaction"),
|
||||
"realized": MessageLookupByLibrary.simpleMessage("Realized"),
|
||||
"receive": m7,
|
||||
"receivePayment":
|
||||
|
|
|
@ -258,6 +258,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"La configuración de envío protegido ha cambiado"),
|
||||
"purple": MessageLookupByLibrary.simpleMessage("Morada"),
|
||||
"qty": MessageLookupByLibrary.simpleMessage("Cantidad"),
|
||||
"rawTransaction":
|
||||
MessageLookupByLibrary.simpleMessage("Transacción con firmar"),
|
||||
"realized": MessageLookupByLibrary.simpleMessage("Dio Cuenta"),
|
||||
"receive": m7,
|
||||
"receivePayment":
|
||||
|
|
|
@ -263,6 +263,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"Changement de PIN avant envoi"),
|
||||
"purple": MessageLookupByLibrary.simpleMessage("Violet"),
|
||||
"qty": MessageLookupByLibrary.simpleMessage("Quantité"),
|
||||
"rawTransaction":
|
||||
MessageLookupByLibrary.simpleMessage("Transaction Signée"),
|
||||
"realized": MessageLookupByLibrary.simpleMessage("Réalisé"),
|
||||
"receive": m7,
|
||||
"receivePayment":
|
||||
|
|
|
@ -2121,6 +2121,16 @@ class S {
|
|||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Raw Transaction`
|
||||
String get rawTransaction {
|
||||
return Intl.message(
|
||||
'Raw Transaction',
|
||||
name: 'rawTransaction',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||
|
|
|
@ -259,25 +259,25 @@ class HomeInnerState extends State<HomeInnerPage> with SingleTickerProviderState
|
|||
_sign() async {
|
||||
final result = await FilePicker.platform.pickFiles();
|
||||
|
||||
String msg;
|
||||
if (result != null) {
|
||||
final res = await WarpApi.signOnly(active.coin, active.id, result.files.single.path!, (progress) {
|
||||
progressPort.sendPort.send(progress);
|
||||
});
|
||||
progressPort.sendPort.send(0);
|
||||
if (res.startsWith("00")) { // first byte is success/error
|
||||
msg = WarpApi.broadcastHex(active.coin, res.substring(2));
|
||||
final txRaw = res.substring(2);
|
||||
await saveFile(txRaw, 'tx.raw', S.of(context).rawTransaction);
|
||||
}
|
||||
else {
|
||||
final msgHex = res.substring(2);
|
||||
final s = hex.decode(msgHex);
|
||||
final dec = Utf8Decoder();
|
||||
msg = dec.convert(s);
|
||||
}
|
||||
final msg = dec.convert(s);
|
||||
final snackBar = SnackBar(content: Text(msg));
|
||||
rootScaffoldMessengerKey.currentState?.showSnackBar(snackBar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_broadcast() async {
|
||||
final result = await FilePicker.platform.pickFiles();
|
||||
|
|
|
@ -205,5 +205,6 @@
|
|||
"mobileCharges": "On Mobile Data, scanning may incur additional charges. Do you want to proceed?",
|
||||
"iHaveMadeABackup": "I have made a backup",
|
||||
"barcodeScannerIsNotAvailableOnDesktop": "Barcode scanner is not available on desktop",
|
||||
"signOffline": "Sign"
|
||||
"signOffline": "Sign",
|
||||
"rawTransaction": "Raw Transaction"
|
||||
}
|
||||
|
|
|
@ -203,5 +203,6 @@
|
|||
"mobileCharges": "En datos móviles, el escaneo puede incurrir en cargos adicionales. Quieres proceder?",
|
||||
"iHaveMadeABackup": "He hecho una copia de seguridad",
|
||||
"barcodeScannerIsNotAvailableOnDesktop": "El escáner de código de barras no está disponible en el escritorio",
|
||||
"signOffline": "Firmar"
|
||||
"signOffline": "Firmar",
|
||||
"rawTransaction": "Transacción con firmar"
|
||||
}
|
||||
|
|
|
@ -203,5 +203,6 @@
|
|||
"mobileCharges": "Sans Wi-fi, les frais peuvent être élevés. Voulez vous continuer?",
|
||||
"iHaveMadeABackup": "J'ai fait une sauvegarde",
|
||||
"barcodeScannerIsNotAvailableOnDesktop": "Le Barcode scanner est seulement disponible sur mobile",
|
||||
"signOffline": "Signer"
|
||||
"signOffline": "Signer",
|
||||
"rawTransaction": "Transaction Signée"
|
||||
}
|
||||
|
|
|
@ -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.4+219
|
||||
version: 1.2.4+220
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
|
|
Loading…
Reference in New Issue