I am interacting with my deployed smart contract on rinkeby. When I try to dispose the client I got the error message below is the code and the output.
.....
Part of Code
_transactionId = await client.sendTransaction(
credentials,
Transaction.callContract(
contract: contract,
function: _approveFunction(),
parameters: [receiver, amount],
),
chainId: networkId,
);
log('token approval started : $_transactionId');
await _subscription.asFuture();
log('done approving. cancel subscription');
await _subscription.cancel();
log('done cancelling subscription. disposing');
await client.dispose();
log('done disposing');
The output
[log] token approval started : 0x189ae3779b6b3e9603b021906adc03fc159c962ed96bfe12039dc4edf34fd5bb
[log] done approving. cancel subscription
[log] done cancelling subscription. disposing
E/flutter ( 9809): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: JSON-RPC error -32000: subscription not found
I am interacting with my deployed smart contract on rinkeby. When I try to dispose the client I got the error message below is the code and the output. ..... Part of Code _transactionId = await client.sendTransaction( credentials, Transaction.callContract( contract: contract, function: _approveFunction(), parameters: [receiver, amount], ), chainId: networkId, ); log('token approval started : $_transactionId'); await _subscription.asFuture(); log('done approving. cancel subscription'); await _subscription.cancel(); log('done cancelling subscription. disposing'); await client.dispose(); log('done disposing');
The output [log] token approval started : 0x189ae3779b6b3e9603b021906adc03fc159c962ed96bfe12039dc4edf34fd5bb [log] done approving. cancel subscription [log] done cancelling subscription. disposing E/flutter ( 9809): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: JSON-RPC error -32000: subscription not found