Skip to content

Commit 83bdb1c

Browse files
authored
linera-web: expose skip_process_inbox option (#4593) (#4595)
## Motivation Sometimes we have applications that don't need to receive messages, and then it's unpleasant to bother the user to sign message blocks. ## Proposal Allow disabling auto-receipt of messages. ## Test Plan Binding tested locally by modifying the `counter` example. ## Release Plan - These changes should be backported to the latest `testnet` branch, then - be released in a new SDK. ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent c34f72d commit 83bdb1c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

linera-web/src/lib.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,11 @@ impl Client {
205205
/// On transport or protocol error, or if persistent storage is
206206
/// unavailable.
207207
#[wasm_bindgen(constructor)]
208-
pub async fn new(wallet: PersistentWallet, signer: JsSigner) -> Result<Client, JsError> {
208+
pub async fn new(
209+
wallet: PersistentWallet,
210+
signer: JsSigner,
211+
skip_process_inbox: bool,
212+
) -> Result<Client, JsError> {
209213
let mut storage = get_storage().await?;
210214
wallet
211215
.0
@@ -222,7 +226,10 @@ impl Client {
222226
)));
223227
let client_context_clone = client_context.clone();
224228
let chain_listener = ChainListener::new(
225-
ChainListenerConfig::default(),
229+
ChainListenerConfig {
230+
skip_process_inbox,
231+
..ChainListenerConfig::default()
232+
},
226233
client_context_clone,
227234
storage,
228235
tokio_util::sync::CancellationToken::new(),

0 commit comments

Comments
 (0)