diff --git a/gui-orchid/lib/api/orchid_eth/eth_transaction.dart b/gui-orchid/lib/api/orchid_eth/eth_transaction.dart index 0b0e4d5c6..79d0f2a7d 100644 --- a/gui-orchid/lib/api/orchid_eth/eth_transaction.dart +++ b/gui-orchid/lib/api/orchid_eth/eth_transaction.dart @@ -15,12 +15,11 @@ class EthereumTransaction /*extends EthereumTransactionParams*/ { Map toJson() { // Export flat json var json = params.toJson(); - json.addAll({'data': data}); + json['data'] = data; + // Exclude nonce if null if (nonce != null) { - json.addAll({ - 'nonce': nonce, // decimal int - }); + json['nonce'] = nonce; } return json; } @@ -34,8 +33,7 @@ class EthereumTransaction /*extends EthereumTransactionParams*/ { @override bool operator ==(Object other) => identical(this, other) || - super == other && - other is EthereumTransaction && + other is EthereumTransaction && runtimeType == other.runtimeType && params == other.params && data == other.data && diff --git a/gui-orchid/test/pac_transaction_test.dart b/gui-orchid/test/pac_transaction_test.dart index 705e45c8c..c42f351e1 100644 --- a/gui-orchid/test/pac_transaction_test.dart +++ b/gui-orchid/test/pac_transaction_test.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:flutter_test/flutter_test.dart'; import 'package:orchid/api/orchid_crypto.dart'; import 'package:orchid/api/orchid_eth/eth_transaction.dart'; +import 'package:orchid/api/orchid_keys.dart'; import 'package:orchid/vpn/purchase/orchid_pac_transaction.dart'; import 'expect.dart';