Skip to content
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
b8474a8
add user confirm for manual withdraw input when equivalent to max
smk762 Oct 29, 2025
8217353
Merge branch 'dev' into handle-manual-max-withdraw
smk762 Oct 31, 2025
e451198
refactor(withdraw): use SDK executeWithdrawal() to avoid duplicate tr…
CharlVS Oct 31, 2025
78b6545
chore: update SDK submodule to include withdrawal refactoring
CharlVS Oct 31, 2025
0cecc10
Update lib/bloc/withdraw_form/withdraw_form_bloc.dart
CharlVS Nov 2, 2025
b67732d
Apply suggestion from @Copilot
CharlVS Nov 2, 2025
80d3029
Merge branch 'dev' into handle-manual-max-withdraw
CharlVS Nov 2, 2025
218da8a
Refactor: Move bloc access to avoid redundant calls
cursoragent Nov 2, 2025
62cfea1
Merge branch 'dev' into handle-manual-max-withdraw
CharlVS Nov 2, 2025
02aedd7
feat: enhance Linux window close handling
DeckerSU Nov 2, 2025
02dad90
refactor: remove flutter_view references in Linux application
DeckerSU Nov 2, 2025
810a368
remove duplicated uuid copy row
smk762 Nov 3, 2025
4865e31
adds `_saveAsJsonFile` for all platforms
smk762 Nov 3, 2025
8a0e68b
ifx import
smk762 Nov 3, 2025
11f20ff
move swap export button
smk762 Nov 3, 2025
a0cafd3
feat: implement priority sorting for unauthenticated user asset lists
DeckerSU Nov 3, 2025
88eeb07
refactor: remove unauthenticated user priority tickers and related so…
DeckerSU Nov 3, 2025
10358e2
refactor: clean up coin_utils.dart by removing unused imports and sor…
DeckerSU Nov 3, 2025
090b70a
chore(tx-history): remove unused function
takenagain Nov 3, 2025
7868850
fix(tx-history): update timestamp for existing entries in tx cache/state
takenagain Nov 3, 2025
e2840ea
add new transalations
smk762 Nov 4, 2025
7664aff
apply new translations
smk762 Nov 4, 2025
059102b
Merge branch 'dev' into tweak/swap-copy-export
smk762 Nov 10, 2025
0411cae
removes timer on password visibility
smk762 Nov 12, 2025
39e8826
use latest KDF commit on `sia-rc-cleanup`
smk762 Nov 17, 2025
8257d1e
update sdk commit
smk762 Nov 17, 2025
66a294d
update sdk commit
smk762 Nov 17, 2025
870af06
chore: roll sdk
CharlVS Nov 17, 2025
f0c9bd5
Merge branch 'fix/avoid-multi-signing-withdraws' into test-sia-withdraw
smk762 Nov 18, 2025
9db9488
implement SIA withdrawals
smk762 Nov 18, 2025
1f90546
Merge pull request #3400 from KomodoPlatform/test-sia-withdraw
smk762 Nov 18, 2025
42ac9b0
reduce label to avoid second line
smk762 Nov 19, 2025
08e3c11
exclude SIA coins from pk export
smk762 Nov 19, 2025
ad6ea4c
feat: dynamically load coin types for filter
CharlVS Nov 17, 2025
57ece57
feat(wallet): derive asset filters from CoinSubClass and fix Sia prot…
CharlVS Nov 19, 2025
05c60d2
update sdk commit
smk762 Nov 21, 2025
3742a4c
updates sdk commt
smk762 Nov 22, 2025
2ec3cfb
Fix typo in withdrawal confirmation message in English translations
DeckerSU Nov 22, 2025
c8e8ea4
Merge branch 'test-sia' into exclude/sia-pk-export
smk762 Nov 23, 2025
c1b1273
Merge pull request #3404 from KomodoPlatform/exclude/sia-pk-export
smk762 Nov 23, 2025
85d24bf
Merge pull request #3406 from KomodoPlatform/patch-fix-confirm-sendin…
smk762 Nov 23, 2025
200fbfb
Merge branch 'dev' into test-sia
smk762 Nov 23, 2025
0081528
Merge branch 'dev' into handle-manual-max-withdraw
smk762 Nov 23, 2025
6170a7d
Merge pull request #3296 from KomodoPlatform/handle-manual-max-withdraw
smk762 Nov 23, 2025
e9f2306
Merge pull request #3339 from KomodoPlatform/patch-fix-linux-crash-on…
smk762 Nov 23, 2025
2a32376
Merge branch 'dev' into tweak/swap-copy-export
smk762 Nov 23, 2025
0c54afc
Merge pull request #3348 from KomodoPlatform/tweak/swap-copy-export
smk762 Nov 23, 2025
e961181
Merge branch 'dev' into patch-assets-main-list
smk762 Nov 23, 2025
dd1d2a4
Merge pull request #3351 from KomodoPlatform/patch-assets-main-list
smk762 Nov 23, 2025
f9cbb92
Merge branch 'dev' into fix/timestamp-update-without-navigation
smk762 Nov 23, 2025
184a550
Merge pull request #3352 from KomodoPlatform/fix/timestamp-update-wit…
smk762 Nov 23, 2025
1b6e4af
Merge branch 'dev' into chore/no-timer-on-passwd-vis
smk762 Nov 23, 2025
e117548
Merge pull request #3388 from KomodoPlatform/chore/no-timer-on-passwd…
smk762 Nov 23, 2025
e86324c
Merge branch 'dev' into fix/avoid-multi-signing-withdraws
smk762 Nov 23, 2025
f75c155
usd dev sdk branch
smk762 Nov 23, 2025
d771a4e
Merge pull request #3325 from KomodoPlatform/fix/avoid-multi-signing-…
smk762 Nov 23, 2025
3ec09de
Merge branch 'dev' into test-sia
smk762 Nov 23, 2025
e1fc103
use latest dev sdk
smk762 Nov 23, 2025
3bb9486
Merge pull request #3398 from KomodoPlatform/test-sia
smk762 Nov 23, 2025
2d7117f
fix texterror error when not using error key for error value
smk762 Nov 23, 2025
d1d928b
fix balance address/total sync
smk762 Nov 24, 2025
368fcc5
Merge pull request #3408 from KomodoPlatform/fix-sia-balance-lag
smk762 Nov 24, 2025
e48b62b
Use a less vague and clueless error message
smk762 Nov 24, 2025
0dda6de
null safety on taker swap init
smk762 Nov 24, 2025
e1104f1
update SDK to use KDF v2.6.0-staging
smk762 Nov 26, 2025
7c0f789
updates sdk ref to use KDF v2.6.0 release
smk762 Dec 1, 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
20 changes: 18 additions & 2 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"transactionComplete": "Transaction complete!",
"transactionDenied": "Denied",
"coinDisableSpan1": "You can't disable {} while it has a swap in progress",
"confirmSending": "Confirm withdrawl",
"confirmSending": "Confirm withdrawal",
"confirmSend": "Confirm send",
"confirm": "Confirm",
"confirmed": "Confirmed",
Expand Down Expand Up @@ -148,7 +148,7 @@
"settingsMenuSecurity": "Security",
"settingsMenuAbout": "About",
"seedPhraseSettingControlsViewSeed": "View seed phrase",
"seedPhraseSettingControlsDownloadSeed": "Download seed phrase file",
"seedPhraseSettingControlsDownloadSeed": "Download as file",
"debugSettingsResetActivatedCoins": "Reset activated coins",
"debugSettingsDownloadButton": "Download logs",
"or": "Or",
Expand Down Expand Up @@ -320,6 +320,7 @@
"feedbackFormMatrix": "Matrix",
"feedbackFormTelegram": "Telegram",
"feedbackFormSelectContactMethod": "Select contact method",
"feedbackSelectTypeValidation": "Please select a feedback type",
"feedbackFormDiscordHint": "Discord username (e.g., username123)",
"feedbackFormMatrixHint": "Matrix ID (e.g., @user:matrix.org)",
"feedbackFormTelegramHint": "Telegram username (e.g., @username)",
Expand Down Expand Up @@ -381,6 +382,17 @@
"trezorSelectSubTitle": "Select a hardware wallet you'd like to use with Komodo Wallet",
"trezorBrowserUnsupported": "Trezor is not supported on this browser.\nPlease use Chrome for Trezor functionality.",
"trezorTransactionInProgressMessage": "Please confirm transaction on your Trezor device",
"trezorInitializingMessage": "Initializing Trezor device...",
"trezorWaitingForDeviceMessage": "Waiting for Trezor device connection...",
"trezorAwaitingConfirmationMessage": "Please follow instructions on your Trezor device",
"trezorPinRequiredMessage": "Please enter your Trezor PIN",
"trezorPassphraseRequiredMessage": "Please enter your Trezor passphrase",
"trezorAuthFailedMessage": "Trezor authentication failed",
"trezorAuthCancelledMessage": "Trezor authentication was cancelled",
"trezorInitializationFailed": "Trezor initialization failed",
"trezorNoTaskIdFound": "No task ID found",
"trezorProvidePinFailed": "Failed to provide PIN",
"trezorProvidePassphraseFailed": "Failed to provide passphrase",
"mixedCaseError": "If you are using non mixed case address, please try to convert to mixed case one.",
"addressConvertedToMixedCase": "Address automatically converted to mixed-case for checksum validation.",
"invalidAddressChecksum": "Invalid address checksum",
Expand Down Expand Up @@ -515,6 +527,7 @@
"unableToActiveCoin": "Unable to activate {}",
"coinIsNotActive": "{} is not active",
"feedback": "Feedback",
"feedbackDefaultType": "User Feedback",
"feedbackViewTitle": "Send us your feedback",
"feedbackPageDescription": "Help us improve by sharing your suggestions, reporting bugs, or giving general feedback.",
"feedbackThankyou": "Thank you for your feedback!",
Expand All @@ -525,6 +538,9 @@
"totalFees": "Total fees",
"selectProtocol": "Select protocol",
"showSwapData": "Show swap data",
"exportSwapData": "Export swap data",
"orderUuid": "Order UUID: {}",
"swapUuid": "Swap UUID: {}",
"importSwaps": "Import Swaps",
"changeTheme": "Change theme",
"available": "Available",
Expand Down
14 changes: 14 additions & 0 deletions lib/app_config/app_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,20 @@ Map<String, int> priorityCoinsAbbrMap = {
// All other coins get default priority (0)
};

/// Priority ticker symbols for unauthenticated users' asset list.
/// These coins will appear first in the order specified here, before other coins.
/// Order matters: coins are displayed in the order they appear in this list.
const List<String> unauthenticatedUserPriorityTickers = [
'BTC',
'KMD',
'ETH',
'BNB',
'LTC',
'DASH',
'ZEC',
'DOGE',
];

/// List of coins that are excluded from the list of coins displayed on the
/// coin lists (e.g. wallet page, coin selection dropdowns, etc.)
/// TODO: remove this list once zhltc and NFTs are fully supported in the SDK
Expand Down
2 changes: 2 additions & 0 deletions lib/bloc/auth_bloc/auth_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import 'package:web_dex/blocs/wallets_repository.dart';
import 'package:web_dex/model/authorize_mode.dart';
import 'package:web_dex/model/kdf_auth_metadata_extension.dart';
import 'package:web_dex/model/wallet.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:web_dex/generated/codegen_loader.g.dart';

part 'auth_bloc_event.dart';
part 'auth_bloc_state.dart';
Expand Down
24 changes: 12 additions & 12 deletions lib/bloc/auth_bloc/trezor_auth_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,30 @@ mixin TrezorAuthMixin on Bloc<AuthBlocEvent, AuthBlocState> {
switch (authState.status) {
case AuthenticationStatus.initializing:
return AuthBlocState.trezorInitializing(
message: authState.message ?? 'Initializing Trezor device...',
message: authState.message ?? LocaleKeys.trezorInitializingMessage.tr(),
taskId: authState.taskId,
);
case AuthenticationStatus.waitingForDevice:
return AuthBlocState.trezorInitializing(
message:
authState.message ?? 'Waiting for Trezor device connection...',
authState.message ?? LocaleKeys.trezorWaitingForDeviceMessage.tr(),
taskId: authState.taskId,
);
case AuthenticationStatus.waitingForDeviceConfirmation:
return AuthBlocState.trezorAwaitingConfirmation(
message:
authState.message ??
'Please follow instructions on your Trezor device',
LocaleKeys.trezorAwaitingConfirmationMessage.tr(),
taskId: authState.taskId,
);
case AuthenticationStatus.pinRequired:
return AuthBlocState.trezorPinRequired(
message: authState.message ?? 'Please enter your Trezor PIN',
message: authState.message ?? LocaleKeys.trezorPinRequiredMessage.tr(),
taskId: authState.taskId!,
);
case AuthenticationStatus.passphraseRequired:
return AuthBlocState.trezorPassphraseRequired(
message: authState.message ?? 'Please enter your Trezor passphrase',
message: authState.message ?? LocaleKeys.trezorPassphraseRequiredMessage.tr(),
taskId: authState.taskId!,
);
case AuthenticationStatus.authenticating:
Expand All @@ -98,14 +98,14 @@ mixin TrezorAuthMixin on Bloc<AuthBlocEvent, AuthBlocState> {
case AuthenticationStatus.error:
return AuthBlocState.error(
AuthException(
authState.error ?? 'Trezor authentication failed',
authState.error ?? LocaleKeys.trezorAuthFailedMessage.tr(),
type: AuthExceptionType.generalAuthError,
),
);
case AuthenticationStatus.cancelled:
return AuthBlocState.error(
AuthException(
'Trezor authentication was cancelled',
LocaleKeys.trezorAuthCancelledMessage.tr(),
type: AuthExceptionType.generalAuthError,
),
);
Expand All @@ -123,7 +123,7 @@ mixin TrezorAuthMixin on Bloc<AuthBlocEvent, AuthBlocState> {
if (authState.user == null) {
return AuthBlocState.error(
AuthException(
'Trezor initialization failed',
LocaleKeys.trezorInitializationFailed.tr(),
type: AuthExceptionType.generalAuthError,
),
);
Expand Down Expand Up @@ -155,7 +155,7 @@ mixin TrezorAuthMixin on Bloc<AuthBlocEvent, AuthBlocState> {
emit(
AuthBlocState.error(
AuthException(
'No task ID found',
LocaleKeys.trezorNoTaskIdFound.tr(),
type: AuthExceptionType.generalAuthError,
),
),
Expand All @@ -169,7 +169,7 @@ mixin TrezorAuthMixin on Bloc<AuthBlocEvent, AuthBlocState> {
emit(
AuthBlocState.error(
AuthException(
'Failed to provide PIN',
LocaleKeys.trezorProvidePinFailed.tr(),
type: AuthExceptionType.generalAuthError,
),
),
Expand All @@ -187,7 +187,7 @@ mixin TrezorAuthMixin on Bloc<AuthBlocEvent, AuthBlocState> {
emit(
AuthBlocState.error(
AuthException(
'No task ID found',
LocaleKeys.trezorNoTaskIdFound.tr(),
type: AuthExceptionType.generalAuthError,
),
),
Expand All @@ -201,7 +201,7 @@ mixin TrezorAuthMixin on Bloc<AuthBlocEvent, AuthBlocState> {
emit(
AuthBlocState.error(
AuthException(
'Failed to provide passphrase',
LocaleKeys.trezorProvidePassphraseFailed.tr(),
type: AuthExceptionType.generalAuthError,
),
),
Expand Down
18 changes: 17 additions & 1 deletion lib/bloc/coins_bloc/asset_coin_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ extension AssetCoinExtension on Asset {
protocol.config.valueOrNull('protocol', 'protocol_data', 'platform');
}

/// Legacy mapping between SDK [CoinSubClass] and the app-level [CoinType].
///
/// New code should prefer using [CoinSubClass] directly for protocol logic.
extension CoinTypeExtension on CoinSubClass {
CoinType toCoinType() {
switch (this) {
Expand All @@ -71,6 +74,8 @@ extension CoinTypeExtension on CoinSubClass {
return CoinType.ftm20;
case CoinSubClass.arbitrum:
return CoinType.arb20;
case CoinSubClass.sia:
return CoinType.sia;
case CoinSubClass.slp:
return CoinType.slp;
case CoinSubClass.qrc20:
Expand Down Expand Up @@ -107,7 +112,12 @@ extension CoinTypeExtension on CoinSubClass {
return CoinType.krc20;
case CoinSubClass.zhtlc:
return CoinType.zhtlc;
default:
case CoinSubClass.moonbeam:
case CoinSubClass.ewt:
case CoinSubClass.rskSmartBitcoin:
case CoinSubClass.unknown:
// These subclasses are not modeled in the legacy [CoinType] enum.
// New code should avoid going through CoinType entirely.
return CoinType.utxo;
}
}
Expand Down Expand Up @@ -138,6 +148,10 @@ extension CoinTypeExtension on CoinSubClass {
}
}

/// Legacy mapping from app-level [CoinType] back to SDK [CoinSubClass].
///
/// This is used by older flows that still think in terms of `CoinType`
/// (e.g. some NFT / custom-token paths). Prefer [CoinSubClass] in new code.
extension CoinSubClassExtension on CoinType {
CoinSubClass toCoinSubClass() {
switch (this) {
Expand All @@ -147,6 +161,8 @@ extension CoinSubClassExtension on CoinType {
return CoinSubClass.ftm20;
case CoinType.arb20:
return CoinSubClass.arbitrum;
case CoinType.sia:
return CoinSubClass.sia;
case CoinType.slp:
return CoinSubClass.slp;
case CoinType.qrc20:
Expand Down
7 changes: 4 additions & 3 deletions lib/bloc/coins_bloc/coins_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,16 @@ class CoinsBloc extends Bloc<CoinsEvent, CoinsState> {
await emit.forEach(
coinUpdateStream,
onData: (Coin coin) {
if (!state.walletCoins.containsKey(coin.abbr)) {
final key = coin.id.id;
if (!state.walletCoins.containsKey(key)) {
_log.warning(
'Coin ${coin.abbr} not found in wallet coins, skipping update',
);
Comment on lines 161 to 163
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟑 Minor

Update the warning message to use the new key format.

The warning message on line 162 still references coin.abbr, but the method now uses coin.id.id as the key. This could cause confusion during debugging.

Apply this diff to use the consistent key format:

         _log.warning(
-          'Coin ${coin.abbr} not found in wallet coins, skipping update',
+          'Coin ${key} not found in wallet coins, skipping update',
         );
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
_log.warning(
'Coin ${coin.abbr} not found in wallet coins, skipping update',
);
_log.warning(
'Coin ${key} not found in wallet coins, skipping update',
);
πŸ€– Prompt for AI Agents
In lib/bloc/coins_bloc/coins_bloc.dart around lines 161 to 163, the warning log
still references coin.abbr while the code uses coin.id.id as the key; update the
warning message to reference the new key format (coin.id.id) so the log reads
that the coin with key coin.id.id was not found in wallet coins and is being
skipped.

return state;
}
return state.copyWith(
walletCoins: {...state.walletCoins, coin.id.id: coin},
coins: {...state.coins, coin.id.id: coin},
walletCoins: {...state.walletCoins, key: coin},
coins: {...state.coins, key: coin},
);
},
);
Expand Down
8 changes: 7 additions & 1 deletion lib/bloc/coins_bloc/coins_repo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -775,10 +775,16 @@ class CoinsRepo {
spendable: newSpendable,
);

final updatedCoin = coin.copyWith(sendableBalance: newSpendable);

// Broadcast the updated balance so non-streaming assets still emit
// real-time change events through the same path as streaming assets.
_broadcastBalanceChange(updatedCoin);

// Yield updated coin with new balance
// We still set both the deprecated fields and rely on the SDK
// for future access to maintain backward compatibility
yield coin.copyWith(sendableBalance: newSpendable);
yield updatedCoin;
}
} catch (e, s) {
_log.warning('Failed to update balance for ${coin.id}', e, s);
Expand Down
12 changes: 8 additions & 4 deletions lib/bloc/coins_manager/coins_manager_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import 'package:web_dex/bloc/coins_manager/coins_manager_sort.dart';
import 'package:web_dex/bloc/settings/settings_repository.dart';
import 'package:web_dex/blocs/trading_entities_bloc.dart';
import 'package:web_dex/model/coin.dart';
import 'package:web_dex/model/coin_type.dart';
import 'package:web_dex/model/coin_utils.dart';
import 'package:web_dex/shared/utils/extensions/kdf_user_extensions.dart';
import 'package:web_dex/router/state/wallet_state.dart';
Expand Down Expand Up @@ -184,8 +183,11 @@ class CoinsManagerBloc extends Bloc<CoinsManagerEvent, CoinsManagerState> {
CoinsManagerCoinTypeSelect event,
Emitter<CoinsManagerState> emit,
) {
final List<CoinType> newTypes = state.selectedCoinTypes.contains(event.type)
? state.selectedCoinTypes.where((type) => type != event.type).toList()
final List<CoinSubClass> newTypes =
state.selectedCoinTypes.contains(event.type)
? state.selectedCoinTypes
.where((type) => type != event.type)
.toList()
: [...state.selectedCoinTypes, event.type];

emit(state.copyWith(selectedCoinTypes: newTypes));
Expand Down Expand Up @@ -356,7 +358,9 @@ class CoinsManagerBloc extends Bloc<CoinsManagerEvent, CoinsManagerState> {

List<Coin> _filterByType(List<Coin> coins) {
return coins
.where((coin) => state.selectedCoinTypes.contains(coin.type))
.where(
(coin) => state.selectedCoinTypes.contains(coin.id.subClass),
)
.toList();
}

Expand Down
4 changes: 3 additions & 1 deletion lib/bloc/coins_manager/coins_manager_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class CoinsManagerCoinsUpdate extends CoinsManagerEvent {

class CoinsManagerCoinTypeSelect extends CoinsManagerEvent {
const CoinsManagerCoinTypeSelect({required this.type});
final CoinType type;

/// Selected protocol filter, represented by SDK coin subclass.
final CoinSubClass type;
}

class CoinsManagerCoinsSwitch extends CoinsManagerEvent {
Expand Down
8 changes: 6 additions & 2 deletions lib/bloc/coins_manager/coins_manager_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ class CoinsManagerState extends Equatable {
});
final CoinsManagerAction action;
final String searchPhrase;
final List<CoinType> selectedCoinTypes;
/// Selected protocol filters, represented by SDK coin subclasses.
///
/// Using [CoinSubClass] here keeps the UI in sync with SDK protocols
/// without requiring manual updates when new coin types are added.
final List<CoinSubClass> selectedCoinTypes;
final List<Coin> coins;
final List<Coin> selectedCoins;
final CoinsManagerSortData sortData;
Expand Down Expand Up @@ -45,7 +49,7 @@ class CoinsManagerState extends Equatable {
CoinsManagerState copyWith({
CoinsManagerAction? action,
String? searchPhrase,
List<CoinType>? selectedCoinTypes,
List<CoinSubClass>? selectedCoinTypes,
List<Coin>? coins,
List<Coin>? selectedCoins,
CoinsManagerSortData? sortData,
Expand Down
12 changes: 6 additions & 6 deletions lib/bloc/transaction_history/transaction_history_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ class TransactionHistoryBloc
blockHeight: sanitized.blockHeight,
fee: sanitized.fee ?? existing.fee,
memo: sanitized.memo ?? existing.memo,
// Update the timestamp to change date from "Now" once tx
// is confirmed on the blockchain
timestamp: sanitized.timestamp,
);
}

Expand Down Expand Up @@ -192,6 +195,9 @@ class TransactionHistoryBloc
blockHeight: sanitized.blockHeight,
fee: sanitized.fee ?? existing.fee,
memo: sanitized.memo ?? existing.memo,
// Update the timestamp to change date from "Now" once tx
// is confirmed on the blockchain
timestamp: sanitized.timestamp,
);
}

Expand Down Expand Up @@ -242,12 +248,6 @@ class TransactionHistoryBloc
emit(state.copyWith(loading: false, error: event.error));
}

DateTime _sortTime(Transaction tx) {
if (tx.timestamp.millisecondsSinceEpoch != 0) return tx.timestamp;
final firstSeen = _firstSeenAtById[tx.internalId];
return firstSeen ?? DateTime.fromMillisecondsSinceEpoch(0);
}

int _compareTransactions(Transaction left, Transaction right) {
final unconfirmedTimestamp = DateTime.fromMillisecondsSinceEpoch(0);
if (right.timestamp == unconfirmedTimestamp) {
Expand Down
Loading
Loading