Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
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
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
126 changes: 66 additions & 60 deletions lib/dto/ethereum/eth_token_tx_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,32 @@ class EthTokenTxDto {
required this.articulatedLog,
required this.transactionHash,
required this.transactionIndex,
required this.blockHash,
required this.timestamp,
required this.nonce,
required this.gasUsed,
required this.gasPrice,
});

EthTokenTxDto.fromMap(Map<String, dynamic> map)
: address = map['address'] as String,
blockNumber = map['blockNumber'] as int,
logIndex = map['logIndex'] as int,
topics = List<String>.from(map['topics'] as List),
data = map['data'] as String,
articulatedLog = map['articulatedLog'] == null
? null
: ArticulatedLog.fromMap(
Map<String, dynamic>.from(
map['articulatedLog'] as Map,
),
: address = map['address'] as String,
blockNumber = map['blockNumber'] as int,
logIndex = map['logIndex'] as int,
topics = List<String>.from(map['topics'] as List),
data = map['data'] as String,
articulatedLog =
map['articulatedLog'] == null
? null
: ArticulatedLog.fromMap(
Map<String, dynamic>.from(map['articulatedLog'] as Map),
),
transactionHash = map['transactionHash'] as String,
transactionIndex = map['transactionIndex'] as int;
transactionHash = map['transactionHash'] as String,
transactionIndex = map['transactionIndex'] as int,
blockHash = map['blockHash'] as String?,
timestamp = map['timestamp'] as int,
nonce = map['nonce'] as int?,
gasUsed = map['gasUsed'] as int?,
gasPrice = BigInt.tryParse(map['gasPrice'].toString());

final String address;
final int blockNumber;
Expand All @@ -54,6 +63,11 @@ class EthTokenTxDto {
final ArticulatedLog? articulatedLog;
final String transactionHash;
final int transactionIndex;
final String? blockHash;
final int timestamp;
final int? nonce;
final int? gasUsed;
final BigInt? gasPrice;

EthTokenTxDto copyWith({
String? address,
Expand All @@ -65,17 +79,26 @@ class EthTokenTxDto {
String? compressedLog,
String? transactionHash,
int? transactionIndex,
}) =>
EthTokenTxDto(
address: address ?? this.address,
blockNumber: blockNumber ?? this.blockNumber,
logIndex: logIndex ?? this.logIndex,
topics: topics ?? this.topics,
data: data ?? this.data,
articulatedLog: articulatedLog ?? this.articulatedLog,
transactionHash: transactionHash ?? this.transactionHash,
transactionIndex: transactionIndex ?? this.transactionIndex,
);
String? blockHash,
int? timestamp,
int? nonce,
int? gasUsed,
BigInt? gasPrice,
}) => EthTokenTxDto(
address: address ?? this.address,
blockNumber: blockNumber ?? this.blockNumber,
logIndex: logIndex ?? this.logIndex,
topics: topics ?? this.topics,
data: data ?? this.data,
articulatedLog: articulatedLog ?? this.articulatedLog,
transactionHash: transactionHash ?? this.transactionHash,
transactionIndex: transactionIndex ?? this.transactionIndex,
blockHash: blockHash ?? this.blockHash,
timestamp: timestamp ?? this.timestamp,
nonce: nonce ?? this.nonce,
gasUsed: gasUsed ?? this.gasUsed,
gasPrice: gasPrice ?? this.gasPrice,
);

Map<String, dynamic> toMap() {
final map = <String, dynamic>{};
Expand All @@ -87,6 +110,11 @@ class EthTokenTxDto {
map['articulatedLog'] = articulatedLog?.toMap();
map['transactionHash'] = transactionHash;
map['transactionIndex'] = transactionIndex;
map['blockHash'] = blockHash;
map['timestamp'] = timestamp;
map['nonce'] = nonce;
map['gasPrice'] = gasPrice;
map['gasUsed'] = gasUsed;
return map;
}

Expand All @@ -100,30 +128,17 @@ class EthTokenTxDto {
/// inputs : {"_amount":"3291036540000000000","_from":"0x3a5cc8689d1b0cef2c317bc5c0ad6ce88b27d597","_to":"0xc5e81fc2401b8104966637d5334cbce92f01dbf7"}

class ArticulatedLog {
ArticulatedLog({
required this.name,
required this.inputs,
});
ArticulatedLog({required this.name, required this.inputs});

ArticulatedLog.fromMap(Map<String, dynamic> map)
: name = map['name'] as String,
inputs = Inputs.fromMap(
Map<String, dynamic>.from(
map['inputs'] as Map,
),
);
: name = map['name'] as String,
inputs = Inputs.fromMap(Map<String, dynamic>.from(map['inputs'] as Map));

final String name;
final Inputs inputs;

ArticulatedLog copyWith({
String? name,
Inputs? inputs,
}) =>
ArticulatedLog(
name: name ?? this.name,
inputs: inputs ?? this.inputs,
);
ArticulatedLog copyWith({String? name, Inputs? inputs}) =>
ArticulatedLog(name: name ?? this.name, inputs: inputs ?? this.inputs);

Map<String, dynamic> toMap() {
final map = <String, dynamic>{};
Expand All @@ -138,31 +153,22 @@ class ArticulatedLog {
/// _to : "0xc5e81fc2401b8104966637d5334cbce92f01dbf7"
///
class Inputs {
Inputs({
required this.amount,
required this.from,
required this.to,
});
Inputs({required this.amount, required this.from, required this.to});

Inputs.fromMap(Map<String, dynamic> map)
: amount = map['_amount'] as String,
from = map['_from'] as String,
to = map['_to'] as String;
: amount = map['_amount'] as String,
from = map['_from'] as String,
to = map['_to'] as String;

final String amount;
final String from;
final String to;

Inputs copyWith({
String? amount,
String? from,
String? to,
}) =>
Inputs(
amount: amount ?? this.amount,
from: from ?? this.from,
to: to ?? this.to,
);
Inputs copyWith({String? amount, String? from, String? to}) => Inputs(
amount: amount ?? this.amount,
from: from ?? this.from,
to: to ?? this.to,
);

Map<String, dynamic> toMap() {
final map = <String, dynamic>{};
Expand Down
131 changes: 0 additions & 131 deletions lib/dto/ethereum/eth_token_tx_extra_dto.dart

This file was deleted.

Loading
Loading