mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
CW-1273: Implement USDT0 Bridge (#2855)
* feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu. * feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu. * feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu. * Add transaction history and status polling for USDT0 bridging * Add Transaction history and status polling for USDT0 Bridging * USDT0 Bridging Implementation * Update Arbitrum USDT token symbol * fix: Merge conflicts * fix: Merge conflicts * chore: Rever formatting * feat: Implement new flow * feat: Implement new ui flow * Add currency to configure * feat: new ui flow * Update USDT0 implementation - Switch to sqlite for storage instead of hive - Switch bridge history and details to modals - Switch bridge transfer details page to new tx details ui * refactor: rearrange modal action buttons * enhance usdt0 bridge flows * Update lib/entities/wallet_manager.dart [skip ci] --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
co-authored by
Omar Hatem
parent
162e0a5300
commit
586a040e4a
@@ -0,0 +1,46 @@
|
||||
import 'package:cake_wallet/entities/bridge_transfer.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
|
||||
part 'bridge_transfers_store.g.dart';
|
||||
|
||||
class BridgeTransfersStore = BridgeTransfersStoreBase with _$BridgeTransfersStore;
|
||||
|
||||
abstract class BridgeTransfersStoreBase with Store {
|
||||
BridgeTransfersStoreBase() : bridgeTransfers = [] {
|
||||
updateList();
|
||||
}
|
||||
|
||||
@observable
|
||||
List<BridgeTransfer> bridgeTransfers;
|
||||
|
||||
@action
|
||||
Future<void> updateList() async {
|
||||
bridgeTransfers = await BridgeTransfer.selectAll();
|
||||
}
|
||||
|
||||
@action
|
||||
Future<void> addTransfer(BridgeTransfer transfer) async {
|
||||
try {
|
||||
await BridgeTransfer.insert(transfer);
|
||||
await updateList();
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
@action
|
||||
Future<void> updateTransfer(BridgeTransfer transfer) async {
|
||||
try {
|
||||
await BridgeTransfer.update(transfer);
|
||||
await updateList();
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
@computed
|
||||
List<BridgeTransfer> get activeTransfers =>
|
||||
bridgeTransfers.where((b) => b.isActive).toList(growable: false);
|
||||
|
||||
@computed
|
||||
List<BridgeTransfer> get pastTransfers =>
|
||||
bridgeTransfers.where((b) => !b.isActive).toList(growable: false);
|
||||
|
||||
void dispose() {}
|
||||
}
|
||||
Reference in New Issue
Block a user