Skip to content

Commit f716fa8

Browse files
committed
Rename back to PersistentWallet
1 parent 8cca7b0 commit f716fa8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

linera-web/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async fn get_storage() -> Result<WebStorage, <linera_views::memory::MemoryStore
5454

5555
/// A wallet that stores the user's chains and keys in memory.
5656
#[wasm_bindgen(js_name = "Wallet")]
57-
pub struct InMemoryWallet(persistent::Memory<Wallet>);
57+
pub struct PersistentWallet(persistent::Memory<Wallet>);
5858

5959
type ClientContext =
6060
linera_client::client_context::ClientContext<WebEnvironment, persistent::Memory<Wallet>>;
@@ -99,8 +99,8 @@ impl JsFaucet {
9999
/// # Errors
100100
/// If we couldn't retrieve the genesis config from the faucet.
101101
#[wasm_bindgen(js_name = createWallet)]
102-
pub async fn create_wallet(&self) -> JsResult<InMemoryWallet> {
103-
Ok(InMemoryWallet(persistent::Memory::new(
102+
pub async fn create_wallet(&self) -> JsResult<PersistentWallet> {
103+
Ok(PersistentWallet(persistent::Memory::new(
104104
linera_client::wallet::Wallet::new(self.0.genesis_config().await?),
105105
)))
106106
}
@@ -118,7 +118,7 @@ impl JsFaucet {
118118
#[wasm_bindgen(js_name = claimChain)]
119119
pub async fn claim_chain(
120120
&self,
121-
wallet: &mut InMemoryWallet,
121+
wallet: &mut PersistentWallet,
122122
owner: JsValue,
123123
) -> JsResult<String> {
124124
use persistent::PersistExt as _;
@@ -144,13 +144,13 @@ impl JsFaucet {
144144
}
145145

146146
#[wasm_bindgen(js_class = "InMemoryWallet")]
147-
impl InMemoryWallet {
147+
impl PersistentWallet {
148148
/// Attempts to read the wallet from persistent storage.
149149
///
150150
/// # Errors
151151
/// If storage is inaccessible.
152152
#[wasm_bindgen]
153-
pub async fn read() -> Result<Option<InMemoryWallet>, JsError> {
153+
pub async fn read() -> Result<Option<PersistentWallet>, JsError> {
154154
Ok(None)
155155
}
156156
}
@@ -192,7 +192,7 @@ impl Client {
192192
/// On transport or protocol error, or if persistent storage is
193193
/// unavailable.
194194
#[wasm_bindgen(constructor)]
195-
pub async fn new(wallet: InMemoryWallet, signer: JsSigner) -> Result<Client, JsError> {
195+
pub async fn new(wallet: PersistentWallet, signer: JsSigner) -> Result<Client, JsError> {
196196
let mut storage = get_storage().await?;
197197
wallet
198198
.0

0 commit comments

Comments
 (0)