Skip to content

Commit

Permalink
last fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
0xChqrles committed Jul 16, 2024
1 parent f7f4f4f commit a53b24b
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/App/Models/Model.swift
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ extension Model {

self.currentTask = Task {
let response = try! await withCheckedThrowingContinuation { (continuation: CheckedContinuation<FunkitStripeCheckoutQuote, any Error>) in
VaultService.shared.send(GetFunkitStripeCheckoutQuote(address: self.address, amount: self.amount)) { result in
VaultService.shared.send(GetFunkitStripeCheckoutQuote(address: self.address, amount: String(self.parsedAmount))) { result in
DispatchQueue.main.async {
switch result {
case .success(let response):
Expand Down
41 changes: 25 additions & 16 deletions app/App/Navigation/Core/Home/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,31 +146,40 @@ struct HomeView: View {

// PENDING

VStack(spacing: 32) {
ForEach(txHistory.groupedPendingTransactions[day] ?? [], id: \.self.id) { transfer in
let pendingTransfers = txHistory.groupedPendingTransactions[day] ?? []

TransferRow(transfer: transfer)
if !pendingTransfers.isEmpty {
VStack(spacing: 32) {
ForEach(pendingTransfers, id: \.self.id) { transfer in

TransferRow(transfer: transfer)
}
.padding(16)
.background(.accent.opacity(0.2))
.animatePlaceholder(isLoading: .constant(true))
}
.padding(16)
.background(.accent.opacity(0.2))
.background(.background2)
.clipShape(RoundedRectangle(cornerRadius: 16))
}
.background(.background2)
.clipShape(RoundedRectangle(cornerRadius: 16))

// CONFIRMED

VStack(spacing: 32) {
ForEach(txHistory.groupedTransactions[day] ?? [], id: \.self.id) { transfer in
let confirmedTransfers = txHistory.groupedTransactions[day] ?? []

TransferRow(transfer: transfer)
.onAppear {
self.txHistoryModel.onItemAppear(transfer)
}
if !confirmedTransfers.isEmpty {
VStack(spacing: 32) {
ForEach(confirmedTransfers, id: \.self.id) { transfer in

TransferRow(transfer: transfer)
.onAppear {
self.txHistoryModel.onItemAppear(transfer)
}
}
}
.padding(16)
.background(.background2)
.clipShape(RoundedRectangle(cornerRadius: 16))
}
.padding(16)
.background(.background2)
.clipShape(RoundedRectangle(cornerRadius: 16))
}
.padding(.horizontal, 16)
}
Expand Down
2 changes: 2 additions & 0 deletions app/App/Navigation/Core/Home/TransferRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ struct TransferRow: View {

init(transfer: Transaction) {
self.transfer = transfer

print(transfer.to)
}

var body: some View {
Expand Down
5 changes: 4 additions & 1 deletion app/App/Navigation/Core/Onramp/OnrampStripeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ struct OnrampStripeView: View {
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.onAppear {
self.model.createOnrampCheckout()
Task {
try await Task.sleep(for: .seconds(1))
self.model.createOnrampCheckout()
}
}
.navigationBarItems(
leading: IconButton {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"originHash" : "1fbc22d98a38f7670b283d4e1502f232da4fa7b0bcb28be022908ef3d3a31380",
"pins" : [
{
"identity" : "bigint",
"kind" : "remoteSourceControl",
"location" : "https://github.com/attaswift/BigInt.git",
"state" : {
"revision" : "0ed110f7555c34ff468e72e1686e59721f2b0da6",
"version" : "5.3.0"
}
},
{
"identity" : "confettiswiftui",
"kind" : "remoteSourceControl",
"location" : "https://github.com/simibac/ConfettiSwiftUI.git",
"state" : {
"revision" : "f45961f97bbae6fff6e2e64546fea0189425ad92",
"version" : "1.1.0"
}
},
{
"identity" : "cryptoswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/krzyzanowskim/CryptoSwift.git",
"state" : {
"revision" : "039f56c5d7960f277087a0be51f5eb04ed0ec073",
"version" : "1.5.1"
}
},
{
"identity" : "phonenumberkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/marmelroy/PhoneNumberKit",
"state" : {
"revision" : "ee5d7114934e60812c9b47c333f01b67d002be2d",
"version" : "3.7.10"
}
},
{
"identity" : "starknet.swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/software-mansion/starknet.swift",
"state" : {
"branch" : "main",
"revision" : "4e20de5a4117e951bbd3aec28413d33d4620c560"
}
}
],
"version" : 3
}

0 comments on commit a53b24b

Please sign in to comment.