mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-20 18:56:23 +00:00
Fix min_deposit/min_withdraw mismatch: 10 USDT backend vs 1 USDT wallet UI
wallet-android's Bridge screen has always advertised a 1 USDT minimum (MIN_USDT constant), but usdt-bridge's actual min_deposit/min_withdraw defaulted to 10 USDT since the tool's original scaffold commit - nobody had ever reconciled the two. Confirmed live: a real user swap of ~1 USDT landed correctly at the multisig custody address but was silently skipped by listen_deposits (amount < min_deposit), so the user never received wUSDT despite the wallet telling them 1 USDT was a valid amount. Backend now matches the value already promised to users, not the other way around - changing the wallet's displayed minimum after users have already relied on it would be the wrong direction to reconcile this in.
This commit is contained in:
1 parent
96840fd17e
commit
c0a982b32c
2 files changed
+7
-5
No files matched your search
@@ -3,8 +3,8 @@
|
|||||||
"pezkuwi_rpc": "wss://asset-hub-rpc.pezkuwichain.io",
|
"pezkuwi_rpc": "wss://asset-hub-rpc.pezkuwichain.io",
|
||||||
"polkadot_usdt_asset_id": 1984,
|
"polkadot_usdt_asset_id": 1984,
|
||||||
"pezkuwi_wusdt_asset_id": 1000,
|
"pezkuwi_wusdt_asset_id": 1000,
|
||||||
"min_deposit": 10000000,
|
"min_deposit": 1000000,
|
||||||
"min_withdraw": 10000000,
|
"min_withdraw": 1000000,
|
||||||
"fee_basis_points": 10,
|
"fee_basis_points": 10,
|
||||||
"seed_path": "bridge_seed.json",
|
"seed_path": "bridge_seed.json",
|
||||||
"db_path": "bridge_db.json",
|
"db_path": "bridge_db.json",
|
||||||
|
|||||||
@@ -23,7 +23,9 @@
|
|||||||
//! `Multisig.approveAsMulti`/`asMulti`, which is expected to happen through pwap-web's
|
//! `Multisig.approveAsMulti`/`asMulti`, which is expected to happen through pwap-web's
|
||||||
//! existing multisig UI (shared/lib/multisig.ts, shared/lib/usdt.ts, MultisigMembers.tsx),
|
//! existing multisig UI (shared/lib/multisig.ts, shared/lib/usdt.ts, MultisigMembers.tsx),
|
||||||
//! not this relayer.
|
//! not this relayer.
|
||||||
//! - Minimum deposit/withdraw: 10 USDT
|
//! - Minimum deposit/withdraw: 1 USDT (matches wallet-android's advertised minimum - this was a
|
||||||
|
//! leftover scaffold default of 10 USDT that nobody had reconciled with the app's own 1 USDT
|
||||||
|
//! minimum until a real user swap below 10 but above 1 USDT was silently skipped)
|
||||||
//! - Fees: Configurable (default 0.1%)
|
//! - Fees: Configurable (default 0.1%)
|
||||||
|
|
||||||
use anyhow::{anyhow, Context, Result};
|
use anyhow::{anyhow, Context, Result};
|
||||||
@@ -152,8 +154,8 @@ impl Default for BridgeConfig {
|
|||||||
pezkuwi_rpc: "wss://asset-hub-rpc.pezkuwichain.io".to_string(),
|
pezkuwi_rpc: "wss://asset-hub-rpc.pezkuwichain.io".to_string(),
|
||||||
polkadot_usdt_asset_id: 1984,
|
polkadot_usdt_asset_id: 1984,
|
||||||
pezkuwi_wusdt_asset_id: 1000,
|
pezkuwi_wusdt_asset_id: 1000,
|
||||||
min_deposit: 10_000_000, // 10 USDT (6 decimals)
|
min_deposit: 1_000_000, // 1 USDT (6 decimals) - matches wallet-android's advertised minimum
|
||||||
min_withdraw: 10_000_000,
|
min_withdraw: 1_000_000,
|
||||||
fee_basis_points: 10, // 0.1%
|
fee_basis_points: 10, // 0.1%
|
||||||
seed_path: PathBuf::from("bridge_seed.json"),
|
seed_path: PathBuf::from("bridge_seed.json"),
|
||||||
db_path: PathBuf::from("bridge_db.json"),
|
db_path: PathBuf::from("bridge_db.json"),
|
||||||
|
|||||||
Reference in new issue
Block a user