-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to submit TXs without using subscriptions #3683
Comments
We used to use the The submit(
tx: HexString!
): Transaction! We could reimplement the reverse functionality, making the subscription opt out? |
Since the default behavior is to have a subscription right now, it seems like it would be a breaking change if the default is only a submit. |
@Voxelot agreed and we won't change the default behaviour, this will be optional. Ideally most consumers will still use the I'd expect something like the below snippet: // Default behaviour
const { waitForResult } = await wallet.sendTransaction(txRequest); // 1 request via `submitAndAwaitStatus`
const result = await waitForResult(); // 0 requests to assemble summary, previous subscription used // `subscribe: false`
const { waitForResult } = await wallet.sendTransaction(txRequest, { subscribe: false }); // 1 request made via `submit`
const result = await waitForResult(); // 1 request made to `statusChange` to assemble summary |
According to @LuizAsFight:
sendTransaction
which callssubmitAndAwaitStatus
on ts sdk side. Then the wallet just gets the transaction id , returns do the dapp and abruptly closes the wallet popup, not waiting for anything from this subscription anymore. could we have a way to submit a transaction that doesn't open a sub and instead just submit the tx? in the wallet use cases we dont need to wait for anything.Follow-up issue:
The text was updated successfully, but these errors were encountered: