diff --git a/packages/espressocash_app/lib/data/db/db.dart b/packages/espressocash_app/lib/data/db/db.dart index 31130f6eb2..0abfefa53a 100644 --- a/packages/espressocash_app/lib/data/db/db.dart +++ b/packages/espressocash_app/lib/data/db/db.dart @@ -24,7 +24,7 @@ class OutgoingTransferRows extends Table { Set> get primaryKey => {id}; } -const int latestVersion = 55; +const int latestVersion = 56; const _tables = [ OutgoingTransferRows, @@ -151,7 +151,10 @@ class MyDatabase extends _$MyDatabase { offRampOrderRows.referenceNumber, ); } - if (from < 55) { + if (from >= 40 && from < 55) { + await m.addColumn(offRampOrderRows, offRampOrderRows.refundAmount); + } + if (from < 56) { await m.createTable(tokenRows); } }, @@ -212,6 +215,7 @@ class OffRampOrderRows extends Table with AmountMixin, EntityMixin { TextColumn get stellarTxHash => text().nullable()(); IntColumn get bridgeAmount => integer().nullable()(); TextColumn get referenceNumber => text().nullable()(); + IntColumn get refundAmount => integer().nullable()(); } enum OnRampOrderStatus { diff --git a/packages/espressocash_app/lib/features/analytics/analytics_manager.dart b/packages/espressocash_app/lib/features/analytics/analytics_manager.dart index 584c968ff8..e0b69ccdeb 100644 --- a/packages/espressocash_app/lib/features/analytics/analytics_manager.dart +++ b/packages/espressocash_app/lib/features/analytics/analytics_manager.dart @@ -31,6 +31,10 @@ class AnalyticsManager { } } + void setStellarAddress(String? address) { + _analytics.getPeople().set('stellarWalletAddress', address); + } + void setUsdcBalance(Decimal value) { _analytics.getPeople().set('usdcBalance', value.toDouble()); } @@ -68,4 +72,20 @@ class AnalyticsManager { 'directPaymentSent', properties: {'amount': amount.toDouble()}, ); + + void paymentRequestLinkCreated({ + required Decimal amount, + }) => + _analytics.track( + 'paymentRequestLinkCreated', + properties: {'amount': amount.toDouble()}, + ); + + void paymentRequestLinkPaid({ + required Decimal amount, + }) => + _analytics.track( + 'paymentRequestLinkPaid', + properties: {'amount': amount.toDouble()}, + ); } diff --git a/packages/espressocash_app/lib/features/incoming_link_payments/screens/incoming_link_payment_screen.dart b/packages/espressocash_app/lib/features/incoming_link_payments/screens/incoming_link_payment_screen.dart index bb86e2cf3c..b47983651c 100644 --- a/packages/espressocash_app/lib/features/incoming_link_payments/screens/incoming_link_payment_screen.dart +++ b/packages/espressocash_app/lib/features/incoming_link_payments/screens/incoming_link_payment_screen.dart @@ -15,7 +15,6 @@ import '../../transactions/widgets/transfer_progress.dart'; import '../../transactions/widgets/transfer_success.dart'; import '../data/ilp_repository.dart'; import '../models/incoming_link_payment.dart'; -import '../widgets/extensions.dart'; import '../widgets/invalid_escrow_error_widget.dart'; class IncomingLinkPaymentScreen extends StatefulWidget { @@ -68,7 +67,6 @@ class _IncomingLinkPaymentScreenState extends State { ? const InvalidEscrowErrorWidget() : TransferError( onBack: () => Navigator.pop(context), - onRetry: () => context.retryILP(payment), ), orElse: () => TransferProgress( onBack: () => Navigator.pop(context), diff --git a/packages/espressocash_app/lib/features/incoming_link_payments/services/ilp_service.dart b/packages/espressocash_app/lib/features/incoming_link_payments/services/ilp_service.dart index e292129697..8ce87c66f0 100644 --- a/packages/espressocash_app/lib/features/incoming_link_payments/services/ilp_service.dart +++ b/packages/espressocash_app/lib/features/incoming_link_payments/services/ilp_service.dart @@ -84,23 +84,6 @@ class ILPService implements Disposable { return payment; } - Future retry( - IncomingLinkPayment payment, { - required ECWallet account, - }) async { - final status = await _createTx( - escrow: await payment.escrow.keyPair, - account: account, - ); - - final newPayment = payment.copyWith(status: status); - - await _repository.save(newPayment); - _subscribe(payment.id); - - return newPayment; - } - Future _createTx({ required ECWallet account, required Ed25519HDKeyPair escrow, diff --git a/packages/espressocash_app/lib/features/incoming_link_payments/widgets/extensions.dart b/packages/espressocash_app/lib/features/incoming_link_payments/widgets/extensions.dart index 2740857e92..966982f427 100644 --- a/packages/espressocash_app/lib/features/incoming_link_payments/widgets/extensions.dart +++ b/packages/espressocash_app/lib/features/incoming_link_payments/widgets/extensions.dart @@ -5,7 +5,6 @@ import 'package:solana/solana.dart'; import '../../../di.dart'; import '../../../ui/loader.dart'; import '../../accounts/models/account.dart'; -import '../models/incoming_link_payment.dart'; import '../services/ilp_service.dart'; extension BuildContextExt on BuildContext { @@ -23,17 +22,6 @@ extension BuildContextExt on BuildContext { return payment.id; }); - - Future retryILP(IncomingLinkPayment payment) => - runWithLoader(this, () async { - final span = _start(function: 'retryILP'); - - await sl().retry( - payment, - account: sl().wallet, - ); - await span.finish(); - }); } ISentrySpan _start({required String function}) => Sentry.startTransaction( diff --git a/packages/espressocash_app/lib/features/outgoing_direct_payments/screens/odp_details_screen.dart b/packages/espressocash_app/lib/features/outgoing_direct_payments/screens/odp_details_screen.dart index f7cb910c52..cf05056535 100644 --- a/packages/espressocash_app/lib/features/outgoing_direct_payments/screens/odp_details_screen.dart +++ b/packages/espressocash_app/lib/features/outgoing_direct_payments/screens/odp_details_screen.dart @@ -85,7 +85,6 @@ class _ODPDetailsScreenState extends State { ), txFailure: (it) => TransferError( onBack: () => Navigator.pop(context), - onRetry: () => context.retryODP(paymentId: payment.id), onCancel: () => _handleCancel(payment.id), reason: it.reason, ), diff --git a/packages/espressocash_app/lib/features/outgoing_direct_payments/services/odp_service.dart b/packages/espressocash_app/lib/features/outgoing_direct_payments/services/odp_service.dart index cad00298da..1ecf66b6bd 100644 --- a/packages/espressocash_app/lib/features/outgoing_direct_payments/services/odp_service.dart +++ b/packages/espressocash_app/lib/features/outgoing_direct_payments/services/odp_service.dart @@ -73,26 +73,6 @@ class ODPService { return payment; } - Future retry( - String paymentId, { - required ECWallet account, - }) async { - final payment = await _repository.load(paymentId); - if (payment == null || !payment.isRetriable) return; - - final status = await _createTx( - account: account, - receiver: payment.receiver, - amount: payment.amount, - reference: payment.reference, - ); - - final newPayment = payment.copyWith(status: status); - - await _repository.save(newPayment); - _subscribe(newPayment.id); - } - Future cancel(String paymentId) async { final payment = await _repository.load(paymentId); if (payment == null || !payment.isRetriable) return; diff --git a/packages/espressocash_app/lib/features/outgoing_direct_payments/widgets/extensions.dart b/packages/espressocash_app/lib/features/outgoing_direct_payments/widgets/extensions.dart index 4e392dc164..894245936b 100644 --- a/packages/espressocash_app/lib/features/outgoing_direct_payments/widgets/extensions.dart +++ b/packages/espressocash_app/lib/features/outgoing_direct_payments/widgets/extensions.dart @@ -31,14 +31,6 @@ extension BuildContextExt on BuildContext { return payment.id; }); - Future retryODP({required String paymentId}) => - runWithLoader(this, () async { - await sl().retry( - paymentId, - account: sl().wallet, - ); - }); - Future cancelODP({required String paymentId}) => runWithLoader(this, () async { await sl().cancel(paymentId); diff --git a/packages/espressocash_app/lib/features/outgoing_link_payments/screens/olp_screen.dart b/packages/espressocash_app/lib/features/outgoing_link_payments/screens/olp_screen.dart index 2c3f65b0bb..d651bbedd1 100644 --- a/packages/espressocash_app/lib/features/outgoing_link_payments/screens/olp_screen.dart +++ b/packages/espressocash_app/lib/features/outgoing_link_payments/screens/olp_screen.dart @@ -131,12 +131,6 @@ class _OLPScreenState extends State { cancelButton, ], txFailure: (s) => [ - CpButton( - size: CpButtonSize.big, - width: double.infinity, - text: context.l10n.retry, - onPressed: () => context.retryOLP(payment: payment), - ), cancelButton, ], cancelTxFailure: (s) => [ diff --git a/packages/espressocash_app/lib/features/outgoing_link_payments/services/olp_service.dart b/packages/espressocash_app/lib/features/outgoing_link_payments/services/olp_service.dart index f05d7b4fef..bc6abbd345 100644 --- a/packages/espressocash_app/lib/features/outgoing_link_payments/services/olp_service.dart +++ b/packages/espressocash_app/lib/features/outgoing_link_payments/services/olp_service.dart @@ -109,23 +109,6 @@ class OLPService implements Disposable { return payment; } - Future retry( - OutgoingLinkPayment payment, { - required ECWallet account, - }) async { - final status = await _createTx( - amount: payment.amount, - account: account, - ); - - final newPayment = payment.copyWith(status: status); - - await _repository.save(newPayment); - _subscribe(payment.id); - - return newPayment; - } - Future cancel( OutgoingLinkPayment payment, { required ECWallet account, diff --git a/packages/espressocash_app/lib/features/outgoing_link_payments/widgets/extensions.dart b/packages/espressocash_app/lib/features/outgoing_link_payments/widgets/extensions.dart index fc3be33d59..99ce3a1a41 100644 --- a/packages/espressocash_app/lib/features/outgoing_link_payments/widgets/extensions.dart +++ b/packages/espressocash_app/lib/features/outgoing_link_payments/widgets/extensions.dart @@ -33,16 +33,6 @@ extension BuildContextExt on BuildContext { ); await span.finish(); }); - - Future retryOLP({required OutgoingLinkPayment payment}) => - runWithLoader(this, () async { - final span = _start(function: 'retryOLP'); - await sl().retry( - payment, - account: sl().wallet, - ); - await span.finish(); - }); } ISentrySpan _start({required String function}) => Sentry.startTransaction( diff --git a/packages/espressocash_app/lib/features/payment_request/services/payment_request_service.dart b/packages/espressocash_app/lib/features/payment_request/services/payment_request_service.dart index ab357013c2..8cc37f7bfe 100644 --- a/packages/espressocash_app/lib/features/payment_request/services/payment_request_service.dart +++ b/packages/espressocash_app/lib/features/payment_request/services/payment_request_service.dart @@ -12,6 +12,7 @@ import 'package:solana/solana_pay.dart'; import 'package:uuid/uuid.dart'; import '../../accounts/auth_scope.dart'; +import '../../analytics/analytics_manager.dart'; import '../../balances/services/refresh_balance.dart'; import '../../currency/models/amount.dart'; import '../../tokens/token.dart'; @@ -23,12 +24,14 @@ class PaymentRequestService implements Disposable { PaymentRequestService( this._repository, this._solanaClient, + this._analyticsManager, this._refreshBalance, this._ecClient, ); final PaymentRequestRepository _repository; final SolanaClient _solanaClient; + final AnalyticsManager _analyticsManager; final RefreshBalance _refreshBalance; final EspressoCashClient _ecClient; @@ -126,6 +129,10 @@ class PaymentRequestService implements Disposable { ), ); + _analyticsManager.paymentRequestLinkPaid( + amount: request.payRequest.amount ?? Decimal.zero, + ); + _refreshBalance(); await _subscriptions[request.id]?.cancel(); @@ -178,6 +185,8 @@ class PaymentRequestService implements Disposable { ); await _repository.save(paymentRequest); + _analyticsManager.paymentRequestLinkCreated(amount: amount); + _subscribe(paymentRequest); return paymentRequest; diff --git a/packages/espressocash_app/lib/features/ramp/partners/moneygram/service/moneygram_off_ramp_service.dart b/packages/espressocash_app/lib/features/ramp/partners/moneygram/service/moneygram_off_ramp_service.dart index fd3fb71c95..941f999da5 100644 --- a/packages/espressocash_app/lib/features/ramp/partners/moneygram/service/moneygram_off_ramp_service.dart +++ b/packages/espressocash_app/lib/features/ramp/partners/moneygram/service/moneygram_off_ramp_service.dart @@ -664,6 +664,20 @@ class MoneygramOffRampOrderService implements Disposable { final solanaAddress = _ecWallet.address; + final refundAmount = await _ecClient + .calculateMoneygramFee( + MoneygramFeeRequestDto( + type: RampTypeDto.onRamp, + amount: (int.parse(response.amount) / 10000000).toString(), + ), + ) + .then( + (e) => Amount.fromDecimal( + value: Decimal.parse(e.totalAmount), + currency: Currency.usdc, + ), + ); + final bridgeTx = await _ecClient .swapToSolana( SwapToSolanaRequestDto( @@ -695,6 +709,7 @@ class MoneygramOffRampOrderService implements Disposable { : OffRampOrderRowsCompanion( stellarTxHash: Value(hash), status: const Value(OffRampOrderStatus.waitingForRefundBridge), + refundAmount: Value(refundAmount.value), ); } diff --git a/packages/espressocash_app/lib/features/ramp/screens/off_ramp_order_screen.dart b/packages/espressocash_app/lib/features/ramp/screens/off_ramp_order_screen.dart index 21d550dfc2..acbb966e59 100644 --- a/packages/espressocash_app/lib/features/ramp/screens/off_ramp_order_screen.dart +++ b/packages/espressocash_app/lib/features/ramp/screens/off_ramp_order_screen.dart @@ -398,12 +398,14 @@ class _Timeline extends StatelessWidget { final bridgingToStellar = CpTimelineItem( title: context.l10n.bridgingText, - trailing: order.bridgeAmount?.let( - (e) => e.isZero ? null : e.format(context.locale, maxDecimals: 2), - ), ); final amountSent = CpTimelineItem( title: context.l10n.offRampWithdrawSent, + trailing: isMoneygramOrder + ? order.bridgeAmount?.let( + (e) => e.isZero ? null : e.format(context.locale, maxDecimals: 2), + ) + : null, ); final paymentSuccess = CpTimelineItem( title: context.l10n.offRampWithdrawReceived, @@ -412,10 +414,18 @@ class _Timeline extends StatelessWidget { ); final paymentCanceled = CpTimelineItem( title: context.l10n.offRampWithdrawCancelledTitle, + trailing: isMoneygramOrder + ? order.refundAmount?.let( + (e) => e.isZero ? null : e.format(context.locale, maxDecimals: 2), + ) + : null, subtitle: order.resolved?.let((t) => context.formatDate(t)), ); - const refunding = CpTimelineItem( + final refunding = CpTimelineItem( title: 'Refunding USDC', + trailing: order.bridgeAmount?.let( + (e) => e.isZero ? null : e.format(context.locale, maxDecimals: 2), + ), ); final normalItems = [ @@ -549,6 +559,7 @@ extension on OffRampOrderStatus { this == OffRampOrderStatus.waitingForRefundBridge; bool get isWaitingForBridge => + this == OffRampOrderStatus.preProcessing || this == OffRampOrderStatus.waitingForRefundBridge || this == OffRampOrderStatus.postProcessing; diff --git a/packages/espressocash_app/lib/features/ramp/services/off_ramp_order_service.dart b/packages/espressocash_app/lib/features/ramp/services/off_ramp_order_service.dart index 35401928ab..1db788ed25 100644 --- a/packages/espressocash_app/lib/features/ramp/services/off_ramp_order_service.dart +++ b/packages/espressocash_app/lib/features/ramp/services/off_ramp_order_service.dart @@ -47,6 +47,7 @@ typedef OffRampOrder = ({ String? authToken, String? referenceNumber, CryptoAmount? bridgeAmount, + CryptoAmount? refundAmount, }); @Singleton(scope: authScope) @@ -154,6 +155,9 @@ class OffRampOrderService implements Disposable { .maybeWhere((it) => it.isNotEmpty) ?.let(Ed25519HDPublicKey.fromBase58); + final refundAmount = row.refundAmount + ?.let((it) => CryptoAmount(value: it, cryptoCurrency: Currency.usdc)); + return ( id: row.id, created: row.created, @@ -171,6 +175,7 @@ class OffRampOrderService implements Disposable { authToken: row.authToken, referenceNumber: row.referenceNumber, bridgeAmount: bridgeAmount, + refundAmount: refundAmount, ); }); } diff --git a/packages/espressocash_app/lib/features/ramp/widgets/on_ramp_deposit_widget.dart b/packages/espressocash_app/lib/features/ramp/widgets/on_ramp_deposit_widget.dart index b9c95accc6..3b2f507d65 100644 --- a/packages/espressocash_app/lib/features/ramp/widgets/on_ramp_deposit_widget.dart +++ b/packages/espressocash_app/lib/features/ramp/widgets/on_ramp_deposit_widget.dart @@ -265,7 +265,8 @@ class _MoneygramDepositContent extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Assets.gifs.moneygramConfirmationAnimation.image(), + Assets.gifs.moneygramConfirmationAnimation + .image(width: 320), const SizedBox(height: 16), Assets.images.moneygramLogo.image(height: 32), const SizedBox(height: 16), diff --git a/packages/espressocash_app/lib/features/stellar/service/stellar_account_service.dart b/packages/espressocash_app/lib/features/stellar/service/stellar_account_service.dart new file mode 100644 index 0000000000..6c6dcc8379 --- /dev/null +++ b/packages/espressocash_app/lib/features/stellar/service/stellar_account_service.dart @@ -0,0 +1,29 @@ +import 'package:injectable/injectable.dart'; +import 'package:sentry_flutter/sentry_flutter.dart'; + +import '../../accounts/auth_scope.dart'; +import '../../analytics/analytics_manager.dart'; +import '../models/stellar_wallet.dart'; + +@Singleton(scope: authScope) +class StellarAccountService { + const StellarAccountService(this._stellarWallet, this._analyticsManager); + + final StellarWallet _stellarWallet; + final AnalyticsManager _analyticsManager; + + @postConstruct + void init() { + final address = _stellarWallet.address; + + Sentry.configureScope( + (scope) => scope.setExtra('stellarWalletAddress', address), + ); + _analyticsManager.setStellarAddress(address); + } + + @disposeMethod + void dispose() { + Sentry.configureScope((scope) => scope.removeExtra('stellarWalletAddress')); + } +} diff --git a/packages/espressocash_app/lib/features/transaction_request/screens/tr_details_screen.dart b/packages/espressocash_app/lib/features/transaction_request/screens/tr_details_screen.dart index cdfad94559..d455cbd1f4 100644 --- a/packages/espressocash_app/lib/features/transaction_request/screens/tr_details_screen.dart +++ b/packages/espressocash_app/lib/features/transaction_request/screens/tr_details_screen.dart @@ -47,8 +47,6 @@ class _TRDetailsScreenState extends State { Navigator.pop(context); } - void _retryTR(String id) => sl().retry(id); - void _handleCancel(String id) => showConfirmationDialog( context, title: context.l10n.outgoingDirectPayments_lblCancelConfirmationTitle @@ -88,7 +86,6 @@ class _TRDetailsScreenState extends State { ), TRStatus.failure => TransferError( onBack: () => Navigator.pop(context), - onRetry: () => _retryTR(payment.id), onCancel: () => _handleCancel(payment.id), ), TRStatus.created || TRStatus.sent => loading, diff --git a/packages/espressocash_app/lib/features/transaction_request/service/tr_service.dart b/packages/espressocash_app/lib/features/transaction_request/service/tr_service.dart index 5fbb072cde..6e233d5bfc 100644 --- a/packages/espressocash_app/lib/features/transaction_request/service/tr_service.dart +++ b/packages/espressocash_app/lib/features/transaction_request/service/tr_service.dart @@ -85,25 +85,6 @@ class TRService { .go(); } - Future retry(String paymentId) async { - final query = _db.select(_db.transactionRequestRows) - ..where((tbl) => tbl.id.equals(paymentId)); - final payment = await query.getSingle(); - - if (payment.status != TRStatusDto.failure) return; - - final updateQuery = _db.update(_db.transactionRequestRows) - ..where((tbl) => tbl.id.equals(paymentId)); - - await updateQuery.write( - const TransactionRequestRowsCompanion( - status: Value(TRStatusDto.created), - ), - ); - - _subscribe(paymentId); - } - void _subscribe(String paymentId) { _subscriptions[paymentId] = (_db.select(_db.transactionRequestRows) ..where((tbl) => tbl.id.equals(paymentId))) diff --git a/packages/espressocash_app/lib/features/transactions/widgets/transfer_error.dart b/packages/espressocash_app/lib/features/transactions/widgets/transfer_error.dart index f80f7720a1..59d3a140eb 100644 --- a/packages/espressocash_app/lib/features/transactions/widgets/transfer_error.dart +++ b/packages/espressocash_app/lib/features/transactions/widgets/transfer_error.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import '../../../l10n/l10n.dart'; -import '../../../ui/button.dart'; import '../../../ui/status_screen.dart'; import '../../../ui/status_widget.dart'; import '../../../ui/text_button.dart'; @@ -10,13 +9,11 @@ import '../models/tx_results.dart'; class TransferError extends StatelessWidget { const TransferError({ super.key, - required this.onRetry, required this.onBack, this.reason, this.onCancel, }); - final VoidCallback onRetry; final VoidCallback onBack; final VoidCallback? onCancel; final TxFailureReason? reason; @@ -41,12 +38,6 @@ class TransferError extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.end, children: [ - CpButton( - size: CpButtonSize.big, - width: double.infinity, - text: context.l10n.retry, - onPressed: onRetry, - ), if (onCancel != null) _CancelButton( onCancel: onCancel, diff --git a/packages/espressocash_app/lib/l10n/intl_en.arb b/packages/espressocash_app/lib/l10n/intl_en.arb index 5284bc81dd..bcffcab2e8 100644 --- a/packages/espressocash_app/lib/l10n/intl_en.arb +++ b/packages/espressocash_app/lib/l10n/intl_en.arb @@ -828,7 +828,7 @@ "@moreInfo": {}, "continueToMoneygram": "Continue to MoneyGram", "@continueToMoneygram": {}, - "bridgingText": "Bridging USDC to Stellar", + "bridgingText": "Connecting to MoneyGram", "@bridgingText": {}, "moneygramInstructionText": "After completing your transfer in person at your chosen MoneyGram payment location, please return here and confirm below.", "@moneygramInstructionText": {}, diff --git a/packages/espressocash_app/lib/storybook/stories/screens/off_ramp_order_screen.dart b/packages/espressocash_app/lib/storybook/stories/screens/off_ramp_order_screen.dart index 745503a549..a9c7980244 100644 --- a/packages/espressocash_app/lib/storybook/stories/screens/off_ramp_order_screen.dart +++ b/packages/espressocash_app/lib/storybook/stories/screens/off_ramp_order_screen.dart @@ -41,6 +41,7 @@ final offRampOrderScreenStory = Story( moreInfoUrl: 'https://example.com', referenceNumber: '11111111', bridgeAmount: null, + refundAmount: null, ), ), ); diff --git a/packages/espressocash_app/moor_schemas/moor_schema_v55.json b/packages/espressocash_app/moor_schemas/moor_schema_v55.json index 0e4ed8dbb2..a79b972e7b 100644 --- a/packages/espressocash_app/moor_schemas/moor_schema_v55.json +++ b/packages/espressocash_app/moor_schemas/moor_schema_v55.json @@ -1 +1,1533 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.1.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"outgoing_transfer_rows","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":1,"references":[],"type":"table","data":{"name":"payment_request_rows","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"dynamic_link","getter_name":"dynamicLink","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"short_link","getter_name":"shortLink","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"state","getter_name":"state","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(PaymentRequestStateDto.values)","dart_type_name":"PaymentRequestStateDto"}},{"name":"transaction_id","getter_name":"transactionId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"resolved_at","getter_name":"resolvedAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"recipient","getter_name":"recipient","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"amount","getter_name":"amount","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"splt_token","getter_name":"spltToken","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"reference","getter_name":"reference","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"message","getter_name":"message","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"memo","getter_name":"memo","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":2,"references":[],"type":"table","data":{"name":"o_d_p_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"receiver","getter_name":"receiver","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"reference","getter_name":"reference","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(ODPStatusDto.values)","dart_type_name":"ODPStatusDto"}},{"name":"tx","getter_name":"tx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_id","getter_name":"txId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_failure_reason","getter_name":"txFailureReason","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(TxFailureReason.values)","dart_type_name":"TxFailureReason"}},{"name":"slot","getter_name":"slot","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":3,"references":[],"type":"table","data":{"name":"transaction_rows","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"encoded_tx","getter_name":"encodedTx","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(TxCommonStatus.values)","dart_type_name":"TxCommonStatus"}},{"name":"amount","getter_name":"amount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":4,"references":[],"type":"table","data":{"name":"o_l_p_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(OLPStatusDto.values)","dart_type_name":"OLPStatusDto"}},{"name":"tx","getter_name":"tx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_id","getter_name":"txId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"withdraw_tx_id","getter_name":"withdrawTxId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"private_key","getter_name":"privateKey","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"link","getter_name":"link","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_failure_reason","getter_name":"txFailureReason","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(TxFailureReason.values)","dart_type_name":"TxFailureReason"}},{"name":"cancel_tx","getter_name":"cancelTx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"cancel_tx_id","getter_name":"cancelTxId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"generated_links_at","getter_name":"generatedLinksAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"resolved_at","getter_name":"resolvedAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"slot","getter_name":"slot","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":5,"references":[],"type":"table","data":{"name":"i_l_p_rows","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx","getter_name":"tx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_id","getter_name":"txId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_failure_reason","getter_name":"txFailureReason","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(TxFailureReason.values)","dart_type_name":"TxFailureReason"}},{"name":"slot","getter_name":"slot","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"private_key","getter_name":"privateKey","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(ILPStatusDto.values)","dart_type_name":"ILPStatusDto"}},{"name":"fee_amount","getter_name":"feeAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":6,"references":[],"type":"table","data":{"name":"on_ramp_order_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_completed","getter_name":"isCompleted","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_completed\" IN (0, 1))","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"human_status","getter_name":"humanStatus","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"machine_status","getter_name":"machineStatus","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"partner_order_id","getter_name":"partnerOrderId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"receive_amount","getter_name":"receiveAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_hash","getter_name":"txHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"partner","getter_name":"partner","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('kado')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(RampPartner.values)","dart_type_name":"RampPartner"}},{"name":"status","getter_name":"status","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(OnRampOrderStatus.values)","dart_type_name":"OnRampOrderStatus"}},{"name":"bank_name","getter_name":"bankName","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bank_account","getter_name":"bankAccount","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bank_transfer_expiry","getter_name":"bankTransferExpiry","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bank_transfer_amount","getter_name":"bankTransferAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"fiat_symbol","getter_name":"fiatSymbol","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"auth_token","getter_name":"authToken","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"more_info_url","getter_name":"moreInfoUrl","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"stellar_tx_hash","getter_name":"stellarTxHash","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"fee_amount","getter_name":"feeAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"reference_number","getter_name":"referenceNumber","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":7,"references":[],"type":"table","data":{"name":"off_ramp_order_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(OffRampOrderStatus.values)","dart_type_name":"OffRampOrderStatus"}},{"name":"human_status","getter_name":"humanStatus","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"machine_status","getter_name":"machineStatus","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"partner_order_id","getter_name":"partnerOrderId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"transaction","getter_name":"transaction","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"deposit_address","getter_name":"depositAddress","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"slot","getter_name":"slot","moor_type":"bigInt","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"resolved_at","getter_name":"resolvedAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"receive_amount","getter_name":"receiveAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"fiat_symbol","getter_name":"fiatSymbol","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"partner","getter_name":"partner","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('kado')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(RampPartner.values)","dart_type_name":"RampPartner"}},{"name":"fee_amount","getter_name":"feeAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"fee_token","getter_name":"feeToken","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"auth_token","getter_name":"authToken","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"withdraw_anchor_account","getter_name":"withdrawAnchorAccount","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"withdraw_memo","getter_name":"withdrawMemo","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"withdraw_url","getter_name":"withdrawUrl","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"more_info_url","getter_name":"moreInfoUrl","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"solana_bridge_tx","getter_name":"solanaBridgeTx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"stellar_tx_hash","getter_name":"stellarTxHash","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bridge_amount","getter_name":"bridgeAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"reference_number","getter_name":"referenceNumber","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":8,"references":[],"type":"table","data":{"name":"outgoing_dln_payment_rows","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx","getter_name":"tx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_id","getter_name":"txId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_failure_reason","getter_name":"txFailureReason","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(TxFailureReason.values)","dart_type_name":"TxFailureReason"}},{"name":"slot","getter_name":"slot","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"receiver_blockchain","getter_name":"receiverBlockchain","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlockchainDto.values)","dart_type_name":"BlockchainDto"}},{"name":"receiver_address","getter_name":"receiverAddress","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(ODLNPaymentStatusDto.values)","dart_type_name":"ODLNPaymentStatusDto"}},{"name":"order_id","getter_name":"orderId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":9,"references":[],"type":"table","data":{"name":"transaction_request_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"label","getter_name":"label","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"transaction","getter_name":"transaction","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"slot","getter_name":"slot","moor_type":"bigInt","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(TRStatusDto.values)","dart_type_name":"TRStatusDto"}}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":10,"references":[],"type":"table","data":{"name":"token_balance_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["token"]}},{"id":11,"references":[],"type":"table","data":{"name":"token_rows","was_declared_in_moor":false,"columns":[{"name":"chain_id","getter_name":"chainId","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"address","getter_name":"address","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"symbol","getter_name":"symbol","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"decimals","getter_name":"decimals","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"logo_u_r_i","getter_name":"logoURI","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_stablecoin","getter_name":"isStablecoin","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_stablecoin\" IN (0, 1))","default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["chain_id","address"]}}]} \ No newline at end of file +{ + "_meta": { + "description": "This file contains a serialized version of schema entities for drift.", + "version": "1.1.0" + }, + "options": { + "store_date_time_values_as_text": false + }, + "entities": [ + { + "id": 0, + "references": [], + "type": "table", + "data": { + "name": "outgoing_transfer_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "id", + "getter_name": "id", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created", + "getter_name": "created", + "moor_type": "dateTime", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "data", + "getter_name": "data", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 1, + "references": [], + "type": "table", + "data": { + "name": "payment_request_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "id", + "getter_name": "id", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created", + "getter_name": "created", + "moor_type": "dateTime", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "dynamic_link", + "getter_name": "dynamicLink", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "short_link", + "getter_name": "shortLink", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "state", + "getter_name": "state", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(PaymentRequestStateDto.values)", + "dart_type_name": "PaymentRequestStateDto" + } + }, + { + "name": "transaction_id", + "getter_name": "transactionId", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "resolved_at", + "getter_name": "resolvedAt", + "moor_type": "dateTime", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "recipient", + "getter_name": "recipient", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "amount", + "getter_name": "amount", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "splt_token", + "getter_name": "spltToken", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "reference", + "getter_name": "reference", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "message", + "getter_name": "message", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "memo", + "getter_name": "memo", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 2, + "references": [], + "type": "table", + "data": { + "name": "o_d_p_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "amount", + "getter_name": "amount", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "token", + "getter_name": "token", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "id", + "getter_name": "id", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created", + "getter_name": "created", + "moor_type": "dateTime", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "receiver", + "getter_name": "receiver", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "reference", + "getter_name": "reference", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "status", + "getter_name": "status", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(ODPStatusDto.values)", + "dart_type_name": "ODPStatusDto" + } + }, + { + "name": "tx", + "getter_name": "tx", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx_id", + "getter_name": "txId", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx_failure_reason", + "getter_name": "txFailureReason", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(TxFailureReason.values)", + "dart_type_name": "TxFailureReason" + } + }, + { + "name": "slot", + "getter_name": "slot", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 3, + "references": [], + "type": "table", + "data": { + "name": "transaction_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "id", + "getter_name": "id", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created", + "getter_name": "created", + "moor_type": "dateTime", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "encoded_tx", + "getter_name": "encodedTx", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "status", + "getter_name": "status", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(TxCommonStatus.values)", + "dart_type_name": "TxCommonStatus" + } + }, + { + "name": "amount", + "getter_name": "amount", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 4, + "references": [], + "type": "table", + "data": { + "name": "o_l_p_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "amount", + "getter_name": "amount", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "token", + "getter_name": "token", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "id", + "getter_name": "id", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created", + "getter_name": "created", + "moor_type": "dateTime", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "status", + "getter_name": "status", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(OLPStatusDto.values)", + "dart_type_name": "OLPStatusDto" + } + }, + { + "name": "tx", + "getter_name": "tx", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx_id", + "getter_name": "txId", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "withdraw_tx_id", + "getter_name": "withdrawTxId", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "private_key", + "getter_name": "privateKey", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "link", + "getter_name": "link", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx_failure_reason", + "getter_name": "txFailureReason", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(TxFailureReason.values)", + "dart_type_name": "TxFailureReason" + } + }, + { + "name": "cancel_tx", + "getter_name": "cancelTx", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "cancel_tx_id", + "getter_name": "cancelTxId", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "generated_links_at", + "getter_name": "generatedLinksAt", + "moor_type": "dateTime", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "resolved_at", + "getter_name": "resolvedAt", + "moor_type": "dateTime", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "slot", + "getter_name": "slot", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 5, + "references": [], + "type": "table", + "data": { + "name": "i_l_p_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "id", + "getter_name": "id", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created", + "getter_name": "created", + "moor_type": "dateTime", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx", + "getter_name": "tx", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx_id", + "getter_name": "txId", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx_failure_reason", + "getter_name": "txFailureReason", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(TxFailureReason.values)", + "dart_type_name": "TxFailureReason" + } + }, + { + "name": "slot", + "getter_name": "slot", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "private_key", + "getter_name": "privateKey", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "status", + "getter_name": "status", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(ILPStatusDto.values)", + "dart_type_name": "ILPStatusDto" + } + }, + { + "name": "fee_amount", + "getter_name": "feeAmount", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 6, + "references": [], + "type": "table", + "data": { + "name": "on_ramp_order_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "amount", + "getter_name": "amount", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "token", + "getter_name": "token", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "id", + "getter_name": "id", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created", + "getter_name": "created", + "moor_type": "dateTime", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "is_completed", + "getter_name": "isCompleted", + "moor_type": "bool", + "nullable": false, + "customConstraints": null, + "defaultConstraints": "CHECK (\"is_completed\" IN (0, 1))", + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "human_status", + "getter_name": "humanStatus", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "machine_status", + "getter_name": "machineStatus", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "partner_order_id", + "getter_name": "partnerOrderId", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "receive_amount", + "getter_name": "receiveAmount", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx_hash", + "getter_name": "txHash", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "partner", + "getter_name": "partner", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": "const Constant('kado')", + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(RampPartner.values)", + "dart_type_name": "RampPartner" + } + }, + { + "name": "status", + "getter_name": "status", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(OnRampOrderStatus.values)", + "dart_type_name": "OnRampOrderStatus" + } + }, + { + "name": "bank_name", + "getter_name": "bankName", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "bank_account", + "getter_name": "bankAccount", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "bank_transfer_expiry", + "getter_name": "bankTransferExpiry", + "moor_type": "dateTime", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "bank_transfer_amount", + "getter_name": "bankTransferAmount", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "fiat_symbol", + "getter_name": "fiatSymbol", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "auth_token", + "getter_name": "authToken", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "more_info_url", + "getter_name": "moreInfoUrl", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "stellar_tx_hash", + "getter_name": "stellarTxHash", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "fee_amount", + "getter_name": "feeAmount", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "reference_number", + "getter_name": "referenceNumber", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 7, + "references": [], + "type": "table", + "data": { + "name": "off_ramp_order_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "amount", + "getter_name": "amount", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "token", + "getter_name": "token", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "id", + "getter_name": "id", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created", + "getter_name": "created", + "moor_type": "dateTime", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "status", + "getter_name": "status", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(OffRampOrderStatus.values)", + "dart_type_name": "OffRampOrderStatus" + } + }, + { + "name": "human_status", + "getter_name": "humanStatus", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "machine_status", + "getter_name": "machineStatus", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "partner_order_id", + "getter_name": "partnerOrderId", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "transaction", + "getter_name": "transaction", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "deposit_address", + "getter_name": "depositAddress", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "slot", + "getter_name": "slot", + "moor_type": "bigInt", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "resolved_at", + "getter_name": "resolvedAt", + "moor_type": "dateTime", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "receive_amount", + "getter_name": "receiveAmount", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "fiat_symbol", + "getter_name": "fiatSymbol", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "partner", + "getter_name": "partner", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": "const Constant('kado')", + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(RampPartner.values)", + "dart_type_name": "RampPartner" + } + }, + { + "name": "fee_amount", + "getter_name": "feeAmount", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "fee_token", + "getter_name": "feeToken", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "auth_token", + "getter_name": "authToken", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "withdraw_anchor_account", + "getter_name": "withdrawAnchorAccount", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "withdraw_memo", + "getter_name": "withdrawMemo", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "withdraw_url", + "getter_name": "withdrawUrl", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "more_info_url", + "getter_name": "moreInfoUrl", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "solana_bridge_tx", + "getter_name": "solanaBridgeTx", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "stellar_tx_hash", + "getter_name": "stellarTxHash", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "bridge_amount", + "getter_name": "bridgeAmount", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "reference_number", + "getter_name": "referenceNumber", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "refund_amount", + "getter_name": "refundAmount", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 8, + "references": [], + "type": "table", + "data": { + "name": "outgoing_dln_payment_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "id", + "getter_name": "id", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created", + "getter_name": "created", + "moor_type": "dateTime", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx", + "getter_name": "tx", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx_id", + "getter_name": "txId", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "tx_failure_reason", + "getter_name": "txFailureReason", + "moor_type": "int", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(TxFailureReason.values)", + "dart_type_name": "TxFailureReason" + } + }, + { + "name": "slot", + "getter_name": "slot", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "receiver_blockchain", + "getter_name": "receiverBlockchain", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(BlockchainDto.values)", + "dart_type_name": "BlockchainDto" + } + }, + { + "name": "receiver_address", + "getter_name": "receiverAddress", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "amount", + "getter_name": "amount", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "status", + "getter_name": "status", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(ODLNPaymentStatusDto.values)", + "dart_type_name": "ODLNPaymentStatusDto" + } + }, + { + "name": "order_id", + "getter_name": "orderId", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 9, + "references": [], + "type": "table", + "data": { + "name": "transaction_request_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "amount", + "getter_name": "amount", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "token", + "getter_name": "token", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "id", + "getter_name": "id", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created", + "getter_name": "created", + "moor_type": "dateTime", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "label", + "getter_name": "label", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "transaction", + "getter_name": "transaction", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "slot", + "getter_name": "slot", + "moor_type": "bigInt", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "status", + "getter_name": "status", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(TRStatusDto.values)", + "dart_type_name": "TRStatusDto" + } + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 10, + "references": [], + "type": "table", + "data": { + "name": "token_balance_rows", + "was_declared_in_moor": false, + "columns": [ + { + "name": "amount", + "getter_name": "amount", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "token", + "getter_name": "token", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "token" + ] + } + } + ] +} \ No newline at end of file diff --git a/packages/espressocash_app/moor_schemas/moor_schema_v56.json b/packages/espressocash_app/moor_schemas/moor_schema_v56.json new file mode 100644 index 0000000000..7d6250b18d --- /dev/null +++ b/packages/espressocash_app/moor_schemas/moor_schema_v56.json @@ -0,0 +1 @@ +{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.1.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"outgoing_transfer_rows","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":1,"references":[],"type":"table","data":{"name":"payment_request_rows","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"dynamic_link","getter_name":"dynamicLink","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"short_link","getter_name":"shortLink","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"state","getter_name":"state","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(PaymentRequestStateDto.values)","dart_type_name":"PaymentRequestStateDto"}},{"name":"transaction_id","getter_name":"transactionId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"resolved_at","getter_name":"resolvedAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"recipient","getter_name":"recipient","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"amount","getter_name":"amount","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"splt_token","getter_name":"spltToken","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"reference","getter_name":"reference","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"message","getter_name":"message","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"memo","getter_name":"memo","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":2,"references":[],"type":"table","data":{"name":"o_d_p_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"receiver","getter_name":"receiver","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"reference","getter_name":"reference","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(ODPStatusDto.values)","dart_type_name":"ODPStatusDto"}},{"name":"tx","getter_name":"tx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_id","getter_name":"txId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_failure_reason","getter_name":"txFailureReason","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(TxFailureReason.values)","dart_type_name":"TxFailureReason"}},{"name":"slot","getter_name":"slot","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":3,"references":[],"type":"table","data":{"name":"transaction_rows","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"encoded_tx","getter_name":"encodedTx","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(TxCommonStatus.values)","dart_type_name":"TxCommonStatus"}},{"name":"amount","getter_name":"amount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":4,"references":[],"type":"table","data":{"name":"o_l_p_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(OLPStatusDto.values)","dart_type_name":"OLPStatusDto"}},{"name":"tx","getter_name":"tx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_id","getter_name":"txId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"withdraw_tx_id","getter_name":"withdrawTxId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"private_key","getter_name":"privateKey","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"link","getter_name":"link","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_failure_reason","getter_name":"txFailureReason","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(TxFailureReason.values)","dart_type_name":"TxFailureReason"}},{"name":"cancel_tx","getter_name":"cancelTx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"cancel_tx_id","getter_name":"cancelTxId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"generated_links_at","getter_name":"generatedLinksAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"resolved_at","getter_name":"resolvedAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"slot","getter_name":"slot","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":5,"references":[],"type":"table","data":{"name":"i_l_p_rows","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx","getter_name":"tx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_id","getter_name":"txId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_failure_reason","getter_name":"txFailureReason","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(TxFailureReason.values)","dart_type_name":"TxFailureReason"}},{"name":"slot","getter_name":"slot","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"private_key","getter_name":"privateKey","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(ILPStatusDto.values)","dart_type_name":"ILPStatusDto"}},{"name":"fee_amount","getter_name":"feeAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":6,"references":[],"type":"table","data":{"name":"on_ramp_order_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_completed","getter_name":"isCompleted","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_completed\" IN (0, 1))","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"human_status","getter_name":"humanStatus","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"machine_status","getter_name":"machineStatus","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"partner_order_id","getter_name":"partnerOrderId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"receive_amount","getter_name":"receiveAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_hash","getter_name":"txHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"partner","getter_name":"partner","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('kado')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(RampPartner.values)","dart_type_name":"RampPartner"}},{"name":"status","getter_name":"status","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(OnRampOrderStatus.values)","dart_type_name":"OnRampOrderStatus"}},{"name":"bank_name","getter_name":"bankName","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bank_account","getter_name":"bankAccount","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bank_transfer_expiry","getter_name":"bankTransferExpiry","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bank_transfer_amount","getter_name":"bankTransferAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"fiat_symbol","getter_name":"fiatSymbol","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"auth_token","getter_name":"authToken","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"more_info_url","getter_name":"moreInfoUrl","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"stellar_tx_hash","getter_name":"stellarTxHash","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"fee_amount","getter_name":"feeAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"reference_number","getter_name":"referenceNumber","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":7,"references":[],"type":"table","data":{"name":"off_ramp_order_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(OffRampOrderStatus.values)","dart_type_name":"OffRampOrderStatus"}},{"name":"human_status","getter_name":"humanStatus","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"machine_status","getter_name":"machineStatus","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"partner_order_id","getter_name":"partnerOrderId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"transaction","getter_name":"transaction","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"deposit_address","getter_name":"depositAddress","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"slot","getter_name":"slot","moor_type":"bigInt","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"resolved_at","getter_name":"resolvedAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"receive_amount","getter_name":"receiveAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"fiat_symbol","getter_name":"fiatSymbol","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"partner","getter_name":"partner","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('kado')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(RampPartner.values)","dart_type_name":"RampPartner"}},{"name":"fee_amount","getter_name":"feeAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"fee_token","getter_name":"feeToken","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"auth_token","getter_name":"authToken","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"withdraw_anchor_account","getter_name":"withdrawAnchorAccount","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"withdraw_memo","getter_name":"withdrawMemo","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"withdraw_url","getter_name":"withdrawUrl","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"more_info_url","getter_name":"moreInfoUrl","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"solana_bridge_tx","getter_name":"solanaBridgeTx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"stellar_tx_hash","getter_name":"stellarTxHash","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bridge_amount","getter_name":"bridgeAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"reference_number","getter_name":"referenceNumber","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"refund_amount","getter_name":"refundAmount","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":8,"references":[],"type":"table","data":{"name":"outgoing_dln_payment_rows","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx","getter_name":"tx","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_id","getter_name":"txId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"tx_failure_reason","getter_name":"txFailureReason","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(TxFailureReason.values)","dart_type_name":"TxFailureReason"}},{"name":"slot","getter_name":"slot","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"receiver_blockchain","getter_name":"receiverBlockchain","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlockchainDto.values)","dart_type_name":"BlockchainDto"}},{"name":"receiver_address","getter_name":"receiverAddress","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(ODLNPaymentStatusDto.values)","dart_type_name":"ODLNPaymentStatusDto"}},{"name":"order_id","getter_name":"orderId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":9,"references":[],"type":"table","data":{"name":"transaction_request_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"label","getter_name":"label","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"transaction","getter_name":"transaction","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"slot","getter_name":"slot","moor_type":"bigInt","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"status","getter_name":"status","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(TRStatusDto.values)","dart_type_name":"TRStatusDto"}}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["id"]}},{"id":10,"references":[],"type":"table","data":{"name":"token_balance_rows","was_declared_in_moor":false,"columns":[{"name":"amount","getter_name":"amount","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"token","getter_name":"token","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["token"]}},{"id":11,"references":[],"type":"table","data":{"name":"token_rows","was_declared_in_moor":false,"columns":[{"name":"chain_id","getter_name":"chainId","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"address","getter_name":"address","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"symbol","getter_name":"symbol","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"decimals","getter_name":"decimals","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"logo_u_r_i","getter_name":"logoURI","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_stablecoin","getter_name":"isStablecoin","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_stablecoin\" IN (0, 1))","default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["chain_id","address"]}}]} \ No newline at end of file diff --git a/packages/espressocash_app/test/stub_analytics_manager.dart b/packages/espressocash_app/test/stub_analytics_manager.dart index c64da59a6e..6f29e5513e 100644 --- a/packages/espressocash_app/test/stub_analytics_manager.dart +++ b/packages/espressocash_app/test/stub_analytics_manager.dart @@ -34,4 +34,13 @@ class StubAnalyticsManager implements AnalyticsManager { @override void setTotalInvestmentsBalance(Decimal value) {} + + @override + void setStellarAddress(String? address) {} + + @override + void paymentRequestLinkCreated({required Decimal amount}) {} + + @override + void paymentRequestLinkPaid({required Decimal amount}) {} } diff --git a/packages/solana_mobile_client/example/lib/client.dart b/packages/solana_mobile_client/example/lib/client.dart index d9ce0d629e..bf0e8f91f2 100644 --- a/packages/solana_mobile_client/example/lib/client.dart +++ b/packages/solana_mobile_client/example/lib/client.dart @@ -6,14 +6,32 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:solana/encoder.dart'; import 'package:solana/solana.dart'; import 'package:solana_mobile_client/solana_mobile_client.dart'; +import 'package:solana_mobile_client_example/config.dart'; part 'client.freezed.dart'; // ignore: avoid-cubits, just an example class ClientBloc extends Cubit { - ClientBloc(this._solanaClient) : super(const ClientState()); + ClientBloc() : super(const ClientState()) { + _initializeClient(); + } + + late SolanaClient _solanaClient; + + void _initializeClient() { + final rpcUrl = state.isMainnet ? mainnetRpcUrl : testnetRpcUrl; + final websocketUrl = state.isMainnet ? mainnetWsUrl : testnetWsUrl; + _solanaClient = SolanaClient( + rpcUrl: Uri.parse(rpcUrl), + websocketUrl: Uri.parse(websocketUrl), + ); + } - final SolanaClient _solanaClient; + void updateNetwork({required bool isMainnet}) { + if (state.isMainnet == isMainnet) return; + _initializeClient(); + emit(ClientState(isMainnet: isMainnet)); + } Future isWalletAvailable() => LocalAssociationScenario.isAvailable(); @@ -180,7 +198,7 @@ class ClientBloc extends Cubit { identityUri: Uri.parse('https://solana.com'), iconUri: Uri.parse('favicon.ico'), identityName: 'Solana', - cluster: 'testnet', + cluster: state.isMainnet ? mainnetCluster : testnetCluster, ); emit(state.copyWith(authorizationResult: result)); @@ -211,6 +229,7 @@ class ClientState with _$ClientState { GetCapabilitiesResult? capabilities, AuthorizationResult? authorizationResult, @Default(false) bool isRequestingAirdrop, + @Default(false) bool isMainnet, }) = _ClientState; const ClientState._(); diff --git a/packages/solana_mobile_client/example/lib/client.freezed.dart b/packages/solana_mobile_client/example/lib/client.freezed.dart index 827231c3dc..4a582b3231 100644 --- a/packages/solana_mobile_client/example/lib/client.freezed.dart +++ b/packages/solana_mobile_client/example/lib/client.freezed.dart @@ -12,7 +12,7 @@ part of 'client.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); /// @nodoc mixin _$ClientState { @@ -20,6 +20,7 @@ mixin _$ClientState { AuthorizationResult? get authorizationResult => throw _privateConstructorUsedError; bool get isRequestingAirdrop => throw _privateConstructorUsedError; + bool get isMainnet => throw _privateConstructorUsedError; @JsonKey(ignore: true) $ClientStateCopyWith get copyWith => @@ -35,7 +36,8 @@ abstract class $ClientStateCopyWith<$Res> { $Res call( {GetCapabilitiesResult? capabilities, AuthorizationResult? authorizationResult, - bool isRequestingAirdrop}); + bool isRequestingAirdrop, + bool isMainnet}); $GetCapabilitiesResultCopyWith<$Res>? get capabilities; $AuthorizationResultCopyWith<$Res>? get authorizationResult; @@ -57,6 +59,7 @@ class _$ClientStateCopyWithImpl<$Res, $Val extends ClientState> Object? capabilities = freezed, Object? authorizationResult = freezed, Object? isRequestingAirdrop = null, + Object? isMainnet = null, }) { return _then(_value.copyWith( capabilities: freezed == capabilities @@ -71,6 +74,10 @@ class _$ClientStateCopyWithImpl<$Res, $Val extends ClientState> ? _value.isRequestingAirdrop : isRequestingAirdrop // ignore: cast_nullable_to_non_nullable as bool, + isMainnet: null == isMainnet + ? _value.isMainnet + : isMainnet // ignore: cast_nullable_to_non_nullable + as bool, ) as $Val); } @@ -101,17 +108,18 @@ class _$ClientStateCopyWithImpl<$Res, $Val extends ClientState> } /// @nodoc -abstract class _$$_ClientStateCopyWith<$Res> +abstract class _$$ClientStateImplCopyWith<$Res> implements $ClientStateCopyWith<$Res> { - factory _$$_ClientStateCopyWith( - _$_ClientState value, $Res Function(_$_ClientState) then) = - __$$_ClientStateCopyWithImpl<$Res>; + factory _$$ClientStateImplCopyWith( + _$ClientStateImpl value, $Res Function(_$ClientStateImpl) then) = + __$$ClientStateImplCopyWithImpl<$Res>; @override @useResult $Res call( {GetCapabilitiesResult? capabilities, AuthorizationResult? authorizationResult, - bool isRequestingAirdrop}); + bool isRequestingAirdrop, + bool isMainnet}); @override $GetCapabilitiesResultCopyWith<$Res>? get capabilities; @@ -120,11 +128,11 @@ abstract class _$$_ClientStateCopyWith<$Res> } /// @nodoc -class __$$_ClientStateCopyWithImpl<$Res> - extends _$ClientStateCopyWithImpl<$Res, _$_ClientState> - implements _$$_ClientStateCopyWith<$Res> { - __$$_ClientStateCopyWithImpl( - _$_ClientState _value, $Res Function(_$_ClientState) _then) +class __$$ClientStateImplCopyWithImpl<$Res> + extends _$ClientStateCopyWithImpl<$Res, _$ClientStateImpl> + implements _$$ClientStateImplCopyWith<$Res> { + __$$ClientStateImplCopyWithImpl( + _$ClientStateImpl _value, $Res Function(_$ClientStateImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -133,8 +141,9 @@ class __$$_ClientStateCopyWithImpl<$Res> Object? capabilities = freezed, Object? authorizationResult = freezed, Object? isRequestingAirdrop = null, + Object? isMainnet = null, }) { - return _then(_$_ClientState( + return _then(_$ClientStateImpl( capabilities: freezed == capabilities ? _value.capabilities : capabilities // ignore: cast_nullable_to_non_nullable @@ -147,17 +156,22 @@ class __$$_ClientStateCopyWithImpl<$Res> ? _value.isRequestingAirdrop : isRequestingAirdrop // ignore: cast_nullable_to_non_nullable as bool, + isMainnet: null == isMainnet + ? _value.isMainnet + : isMainnet // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc -class _$_ClientState extends _ClientState with DiagnosticableTreeMixin { - const _$_ClientState( +class _$ClientStateImpl extends _ClientState with DiagnosticableTreeMixin { + const _$ClientStateImpl( {this.capabilities, this.authorizationResult, - this.isRequestingAirdrop = false}) + this.isRequestingAirdrop = false, + this.isMainnet = false}) : super._(); @override @@ -167,10 +181,13 @@ class _$_ClientState extends _ClientState with DiagnosticableTreeMixin { @override @JsonKey() final bool isRequestingAirdrop; + @override + @JsonKey() + final bool isMainnet; @override String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'ClientState(capabilities: $capabilities, authorizationResult: $authorizationResult, isRequestingAirdrop: $isRequestingAirdrop)'; + return 'ClientState(capabilities: $capabilities, authorizationResult: $authorizationResult, isRequestingAirdrop: $isRequestingAirdrop, isMainnet: $isMainnet)'; } @override @@ -180,38 +197,42 @@ class _$_ClientState extends _ClientState with DiagnosticableTreeMixin { ..add(DiagnosticsProperty('type', 'ClientState')) ..add(DiagnosticsProperty('capabilities', capabilities)) ..add(DiagnosticsProperty('authorizationResult', authorizationResult)) - ..add(DiagnosticsProperty('isRequestingAirdrop', isRequestingAirdrop)); + ..add(DiagnosticsProperty('isRequestingAirdrop', isRequestingAirdrop)) + ..add(DiagnosticsProperty('isMainnet', isMainnet)); } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$_ClientState && + other is _$ClientStateImpl && (identical(other.capabilities, capabilities) || other.capabilities == capabilities) && (identical(other.authorizationResult, authorizationResult) || other.authorizationResult == authorizationResult) && (identical(other.isRequestingAirdrop, isRequestingAirdrop) || - other.isRequestingAirdrop == isRequestingAirdrop)); + other.isRequestingAirdrop == isRequestingAirdrop) && + (identical(other.isMainnet, isMainnet) || + other.isMainnet == isMainnet)); } @override - int get hashCode => Object.hash( - runtimeType, capabilities, authorizationResult, isRequestingAirdrop); + int get hashCode => Object.hash(runtimeType, capabilities, + authorizationResult, isRequestingAirdrop, isMainnet); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$_ClientStateCopyWith<_$_ClientState> get copyWith => - __$$_ClientStateCopyWithImpl<_$_ClientState>(this, _$identity); + _$$ClientStateImplCopyWith<_$ClientStateImpl> get copyWith => + __$$ClientStateImplCopyWithImpl<_$ClientStateImpl>(this, _$identity); } abstract class _ClientState extends ClientState { const factory _ClientState( {final GetCapabilitiesResult? capabilities, final AuthorizationResult? authorizationResult, - final bool isRequestingAirdrop}) = _$_ClientState; + final bool isRequestingAirdrop, + final bool isMainnet}) = _$ClientStateImpl; const _ClientState._() : super._(); @override @@ -221,7 +242,9 @@ abstract class _ClientState extends ClientState { @override bool get isRequestingAirdrop; @override + bool get isMainnet; + @override @JsonKey(ignore: true) - _$$_ClientStateCopyWith<_$_ClientState> get copyWith => + _$$ClientStateImplCopyWith<_$ClientStateImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/packages/solana_mobile_client/example/lib/config.dart b/packages/solana_mobile_client/example/lib/config.dart new file mode 100644 index 0000000000..9038c044d4 --- /dev/null +++ b/packages/solana_mobile_client/example/lib/config.dart @@ -0,0 +1,6 @@ +const String testnetRpcUrl = 'https://api.testnet.solana.com'; +const String testnetWsUrl = 'wss://api.testnet.solana.com'; +const String testnetCluster = 'testnet'; +const String mainnetRpcUrl = 'https://api.mainnet-beta.solana.com'; +const String mainnetWsUrl = 'wss://api.mainnet-beta.solana.com'; +const String mainnetCluster = 'mainnet-beta'; diff --git a/packages/solana_mobile_client/example/lib/main.dart b/packages/solana_mobile_client/example/lib/main.dart index e04c252c75..551dcc1145 100644 --- a/packages/solana_mobile_client/example/lib/main.dart +++ b/packages/solana_mobile_client/example/lib/main.dart @@ -1,17 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:solana/solana.dart'; import 'package:solana_mobile_client_example/client.dart'; void main() { runApp( BlocProvider( - create: (_) => ClientBloc( - SolanaClient( - rpcUrl: Uri.parse('https://api.testnet.solana.com'), - websocketUrl: Uri.parse('wss://api.testnet.solana.com'), - ), - ), + create: (_) => ClientBloc(), child: const MyApp(), ), ); @@ -37,6 +31,7 @@ class MyApp extends StatelessWidget { builder: (context, state) => Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + const NetworkToggleButtons(), Padding( padding: const EdgeInsets.symmetric( horizontal: 8, @@ -144,6 +139,34 @@ class MyApp extends StatelessWidget { ); } +class NetworkToggleButtons extends StatelessWidget { + const NetworkToggleButtons({super.key}); + + @override + Widget build(BuildContext context) => Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: ToggleButtons( + isSelected: [ + !context.watch().state.isMainnet, + context.watch().state.isMainnet, + ], + onPressed: (index) { + context.read().updateNetwork(isMainnet: index == 1); + }, + children: const [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16), + child: Text('Testnet'), + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16), + child: Text('Mainnet'), + ), + ], + ), + ); +} + class SignAndSendTxButton extends StatelessWidget { const SignAndSendTxButton({ super.key,