/// Send tx, [params] will be ignored if we have [rawParam].
/// [onStatusChange] is a callback when tx status change.
/// @return txHash [string] if tx finalized success.
But that's wrong, the method return hash when transaction is validate by Babe, but still not Finalized by Granpa.
By reading your code in tx.dart, I realy don't understand why :
Future<Map?> signAndSend(Map txInfo, String params, password,
Function(String) onStatusChange) async {
final msgId =
"onStatusChange${serviceRoot.webView!.getEvalJavascriptUID()}";
serviceRoot.webView!.addMsgHandler(msgId, onStatusChange);
final code =
'keyring.sendTx(api, ${jsonEncode(txInfo)}, $params, "$password", "$msgId")';
// print(code);
final dynamic res = await serviceRoot.webView!.evalJavascript(code);
serviceRoot.webView!.removeMsgHandler(msgId);
return res;
}
Your signAndSend method is commented with:
But that's wrong, the method return hash when transaction is validate by Babe, but still not Finalized by Granpa.
By reading your code in tx.dart, I realy don't understand why :
Do you have an idea ?