Skip to content

Testing #1135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 60 commits into from
May 19, 2025
Merged

Testing #1135

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e7cd14c
auto save format
julian-CStack Mar 25, 2025
bee49df
linter rule change due to dart 3.7
julian-CStack Mar 25, 2025
8eb9150
WIP spark names
julian-CStack Mar 25, 2025
344a20f
Merge remote-tracking branch 'origin/staging' into sparknames
julian-CStack Apr 3, 2025
b1111d7
eth nonce in tx details view fix and a bunch of autoformat changes
julian-CStack Apr 3, 2025
637fb66
don't display fist price if fetch failed
julian-CStack Apr 4, 2025
5bd1bcb
update liblelantus ref
julian-CStack Apr 4, 2025
0f801cc
replace deprecated calls and formatting
julian-CStack Apr 4, 2025
84d63c2
fix eth sent amount display bug
julian-CStack Apr 4, 2025
17c43eb
log acceptable error as INFO (and some auto formatting)
julian-CStack Apr 4, 2025
724e5cd
don't refresh provider that is not used for eth
julian-CStack Apr 4, 2025
4b61ca3
auto format on save
julian-CStack Apr 5, 2025
0b4eafb
refactor eth transaction nonce fetching
julian-CStack Apr 5, 2025
9a67e1d
refactor eth token transaction fetch and update
julian-CStack Apr 5, 2025
b61ba0e
refactor desktop send fee info/selection to its own widget
julian-CStack Apr 7, 2025
72a1be1
remove conflicting analysis rule
julian-CStack Apr 7, 2025
7a153eb
remove old desktop fee selection dropdown, add nonce override field t…
julian-CStack Apr 7, 2025
3316b69
wip desktop custom eip-1559 fee ui
julian-CStack Apr 7, 2025
568c7c6
refactor eth gas tracker response data
julian-CStack Apr 7, 2025
fb6d35d
add eip-1559 fees fetch functionality
julian-CStack Apr 7, 2025
c23edb0
refactor FeeObject to use BigInt, add EthFeeObject, and of course a p…
julian-CStack Apr 7, 2025
289cc95
fix token fee display issue
julian-CStack Apr 7, 2025
cf5c2fc
desktop eth eip-1559 fees
julian-CStack Apr 8, 2025
566afd6
updated eth server
julian-CStack Apr 9, 2025
6c68f21
always log everything to console in debug mode
julian-CStack Apr 9, 2025
626b7d6
fix eth token balance response parsing
julian-CStack Apr 9, 2025
3614b1b
rough mobile custom eth fees ui
julian-CStack Apr 10, 2025
54bb20f
check range
julian-CStack Apr 25, 2025
9e73ce2
Use changenow v2 api only and update swap to be able to use coin+netw…
julian-CStack Apr 26, 2025
a5554e0
possible fixed rate initial fetch fix
julian-CStack Apr 26, 2025
68adcac
feat(monero): enable local monero nodes via a "Bypass TOR" node option
sneurlax Apr 30, 2025
34ab89b
Merge pull request #1128 from cypherstack/local-monero
julian-CStack Apr 30, 2025
d51cb97
Merge remote-tracking branch 'origin/staging' into sparknames
julian-CStack May 5, 2025
3d25e8a
auto format
julian-CStack May 5, 2025
ce0bcad
add static overflow row widget
julian-CStack May 5, 2025
dddf2df
update spark names electrumx calls
julian-CStack May 6, 2025
6c7ffc7
WIP view spark names
julian-CStack May 6, 2025
836ff9e
Spark names gui and storage using drift with sqlite for caching
julian-CStack May 7, 2025
c20269d
fix name tx confirm send
julian-CStack May 9, 2025
21b8037
spark names
julian-CStack May 9, 2025
fa538b6
adaptive desktop wallet features
julian-CStack May 5, 2025
7034608
global spark name cache service
julian-CStack May 12, 2025
7c1e94f
autoformat again
julian-CStack May 12, 2025
47d4646
allow sending to spark names**
julian-CStack May 12, 2025
b52830e
do some look ahead for spark name lookups
julian-CStack May 12, 2025
8b7e4e6
spark name ui tweaks
julian-CStack May 13, 2025
d66e9fc
Merge remote-tracking branch 'origin/staging' into sparknames
julian-CStack May 13, 2025
abc205c
Merge remote-tracking branch 'origin/staging' into swap-updates
julian-CStack May 13, 2025
edcbf03
Merge pull request #1131 from cypherstack/swap-updates
julian-CStack May 13, 2025
d47f86f
Merge remote-tracking branch 'origin/testing' into sparknames
julian-CStack May 13, 2025
3a81eb7
Merge pull request #1132 from cypherstack/sparknames
julian-CStack May 13, 2025
ac324e2
Merge remote-tracking branch 'origin/testing' into eth-edits
julian-CStack May 13, 2025
f873758
fix issues from mergefest
julian-CStack May 13, 2025
dda8240
Merge pull request #1133 from cypherstack/eth-edits
julian-CStack May 13, 2025
a1467a0
update flutter_libsparkmobile
julian-CStack May 13, 2025
496caf6
Merge remote-tracking branch 'origin/testing' into testing
julian-CStack May 13, 2025
d090eae
disable spark name transactions before they are enabled on chain
julian-CStack May 14, 2025
5db3c63
add mounted check
julian-CStack May 14, 2025
ace8a13
transaction broadcast error logging
julian-CStack May 14, 2025
3743590
get more info from eth rpc errors on send
julian-CStack May 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ linter:
constant_identifier_names: false
prefer_final_locals: true
prefer_final_in_for_each: true
require_trailing_commas: true
# require_trailing_commas: true // causes issues with dart 3.7
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

Expand Down
87 changes: 87 additions & 0 deletions lib/db/drift/database.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* This file is part of Stack Wallet.
*
* Copyright (c) 2025 Cypher Stack
* All Rights Reserved.
* The code is distributed under GPLv3 license, see LICENSE file for details.
* Generated by Cypher Stack on 2025-05-06
*
*/

import 'dart:async';

import 'package:drift/drift.dart';
import 'package:drift_flutter/drift_flutter.dart';
import 'package:path/path.dart' as path;

import '../../utilities/stack_file_system.dart';

part 'database.g.dart';

abstract final class Drift {
static bool _didInit = false;

static final Map<String, WalletDatabase> _map = {};

static WalletDatabase get(String walletId) {
if (!_didInit) {
driftRuntimeOptions.dontWarnAboutMultipleDatabases = true;
_didInit = true;
}

return _map[walletId] ??= WalletDatabase._(walletId);
}
}

class SparkNames extends Table {
TextColumn get name =>
text().customConstraint("UNIQUE NOT NULL COLLATE NOCASE")();
TextColumn get address => text()();
IntColumn get validUntil => integer()();
TextColumn get additionalInfo => text().nullable()();

@override
Set<Column> get primaryKey => {name};
}

@DriftDatabase(tables: [SparkNames])
final class WalletDatabase extends _$WalletDatabase {
WalletDatabase._(String walletId, [QueryExecutor? executor])
: super(executor ?? _openConnection(walletId));

@override
int get schemaVersion => 1;

static QueryExecutor _openConnection(String walletId) {
return driftDatabase(
name: walletId,
native: DriftNativeOptions(
shareAcrossIsolates: true,
databasePath: () async {
final dir = await StackFileSystem.applicationDriftDirectory();
return path.join(dir.path, "wallets", walletId, "$walletId.db");
},
),
);
}

Future<void> upsertSparkNames(
List<
({String name, String address, int validUntil, String? additionalInfo})
>
names,
) async {
await transaction(() async {
for (final name in names) {
await into(sparkNames).insertOnConflictUpdate(
SparkNamesCompanion(
name: Value(name.name),
address: Value(name.address),
validUntil: Value(name.validUntil),
additionalInfo: Value(name.additionalInfo),
),
);
}
});
}
}
Loading
Loading