1ad97adc7c
* Replace expect with error * Move PersistentStorage in separate file * Add in-memory cred manager * Make wasm and mobile build * Unify wasm and mobile cred storage * Network defaults has mainnet default * Add network_details to SDK * Move BandwidthController in its own crate * Move out credential into lib crate * Remove nyxd arg in credential binary * Use acquire cred in sdk * Add example file, in sandbox * Mobile lock file * Update changelog * Clearer builder methods and more documentation for them * Sign only amount, without denom * Toggle credentials mode on when enabled
22 lines
648 B
Rust
22 lines
648 B
Rust
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
use thiserror::Error;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum StorageError {
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
#[error("Database experienced an internal error - {0}")]
|
|
InternalDatabaseError(#[from] sqlx::Error),
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
#[error("Failed to perform database migration - {0}")]
|
|
MigrationError(#[from] sqlx::migrate::MigrateError),
|
|
|
|
#[error("Inconsistent data in database")]
|
|
InconsistentData,
|
|
|
|
#[error("No unused credential in database. You need to buy at least one")]
|
|
NoCredential,
|
|
}
|