Skip to content

Commit abd85fe

Browse files
authored
linera-web: expose skip_process_inbox option (#4593)
## 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 0048a2c commit abd85fe

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

web/@linera/client/src/lib.rs

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

0 commit comments

Comments
 (0)