Closed redDwarf03 closed 2 years ago
looks good to me. maybe an issue with phoenix_socket? or are you sure that you don't create other instances of the connection?
i used:
await subscriptionChannel.connect(
await preferences.getNetwork().getPhoenixHttpLink(),
await preferences.getNetwork().getWebsocketUri());
subscriptionChannel.addSubscriptionTransactionConfirmed(
keychainTransaction.address!, waitConfirmations);
final TransactionStatus transactionStatus =
sendTx(transaction);
subscriptionChannel.close();
and
void waitConfirmations(QueryResult event) {
if (event.data != null &&
event.data!['transactionConfirmed'] != null &&
event.data!['transactionConfirmed']['nbConfirmations'] != null) {
int nb = event.data!['transactionConfirmed']['nbConfirmations'];
} else {
throw Exception('no confirmation");
}
}
(Another thing, do you know how to catch a timeout if i never receive a response from the server ?)
Thank you for your precious help
for info, i add a "leave" call but it doesn't work
no idea, sorry
ok thank you. absinthe and phoenix are not simple to manage subscription with flutter... too few public examples :(
Hello
when i use PhoenixLink with SubscriptionChannel class, i try to close subscription but i see after the closing, some logs with Do you know how to close completely the connection please
Thx