Skip to content

Commit 4c58532

Browse files
authored
ui: amount content transition animation
1 parent b2c88ce commit 4c58532

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

BDKSwiftExampleWallet/View Model/Send/BuildTransactionViewModel.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class BuildTransactionViewModel {
1717
var calculateFee: String?
1818
var psbt: Psbt?
1919
var showingBuildTransactionViewErrorAlert = false
20-
var transactionSentSuccessfully = false
2120

2221
init(
2322
bdkClient: BDKClient = .live
@@ -72,7 +71,6 @@ class BuildTransactionViewModel {
7271
func send(address: String, amount: UInt64, feeRate: UInt64) {
7372
do {
7473
try bdkClient.send(address, amount, feeRate)
75-
self.transactionSentSuccessfully = true
7674
NotificationCenter.default.post(
7775
name: Notification.Name("TransactionSent"),
7876
object: nil

BDKSwiftExampleWallet/View/Send/AmountView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ struct AmountView: View {
2424
VStack(spacing: 4) {
2525
Text("\(numpadAmount.formattedWithSeparator) sats")
2626
.textStyle(BitcoinTitle1())
27+
.contentTransition(.numericText())
28+
.animation(.default, value: numpadAmount)
2729
if let balance = viewModel.balanceTotal {
2830
HStack(spacing: 2) {
2931
Text(balance.delimiter)

0 commit comments

Comments
 (0)