Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ABW-2589] Transaction History #1035

Merged
merged 143 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
225e7e8
wip
kugel3 Feb 10, 2024
fdf1686
wip
kugel3 Feb 10, 2024
d63b2d2
wip: card positions
kugel3 Feb 12, 2024
1815bf0
wip
kugel3 Feb 13, 2024
9d011b1
wip
kugel3 Feb 13, 2024
a80a013
wip
kugel3 Feb 13, 2024
bf052b4
dates
kugel3 Feb 13, 2024
6fa0cbb
date formats
kugel3 Feb 14, 2024
e8436b2
wip
kugel3 Feb 14, 2024
7c5662b
Resource list view
kugel3 Feb 14, 2024
eac722c
wip
kugel3 Feb 15, 2024
62e33c7
wip
kugel3 Feb 15, 2024
ab29be1
wip
kugel3 Feb 15, 2024
57e44b5
wip
kugel3 Feb 15, 2024
9b017d1
wip
kugel3 Feb 15, 2024
c1bb3b3
wip
kugel3 Feb 16, 2024
f7d8541
wip
kugel3 Feb 17, 2024
9e8ef98
wip
kugel3 Feb 17, 2024
f48f118
wip
kugel3 Feb 18, 2024
d8c87a4
wip
kugel3 Feb 18, 2024
a4b9cac
wip
kugel3 Feb 19, 2024
7fbf5c5
Add accessors to TransactionMessage types
kugel3 Feb 19, 2024
42b21fa
Message
kugel3 Feb 19, 2024
8a60430
wip
kugel3 Feb 20, 2024
d254816
Messages
kugel3 Feb 20, 2024
cfcd3e7
wip
kugel3 Feb 21, 2024
d7f8436
Ignore fee balance changes
kugel3 Feb 21, 2024
d35b826
wip
kugel3 Feb 21, 2024
d241126
sort actions
kugel3 Feb 21, 2024
54e12dd
Assetsview change
kugel3 Feb 21, 2024
12372b9
wip
kugel3 Feb 22, 2024
c06e734
wip
kugel3 Feb 22, 2024
fe3e617
wip
kugel3 Feb 23, 2024
d8fbabe
wip
kugel3 Feb 23, 2024
c471a64
wip
kugel3 Feb 23, 2024
ba468f3
Refactor address formatting
kugel3 Feb 23, 2024
e2e698f
wip
kugel3 Feb 25, 2024
c70bc4f
wip
kugel3 Feb 25, 2024
ed84e26
selection
kugel3 Feb 25, 2024
535a556
Selecting StakeClaimNFTs
kugel3 Feb 25, 2024
afc7743
wip
kugel3 Feb 25, 2024
4444657
Transfer Fungbile
kugel3 Feb 25, 2024
6e7c826
transfer nft
kugel3 Feb 25, 2024
fe421cb
Eliminate TransferNFTView
kugel3 Feb 26, 2024
3a27664
Get rid of TransactionReviewFungibleView
kugel3 Feb 26, 2024
252f947
Simplify
kugel3 Feb 26, 2024
c38e8fa
Eliminate TransactionReviewAmountView and LiquidStakeUnitView
kugel3 Feb 26, 2024
ffdcde7
Eliminate TokenBalanceView
kugel3 Feb 26, 2024
9729b4b
Fee payer fixes
kugel3 Feb 26, 2024
824aa66
Remove one case of PoolUnitView
kugel3 Feb 26, 2024
b5cce94
wip
kugel3 Feb 27, 2024
14423aa
wip
kugel3 Feb 27, 2024
75018f6
Eliminate PoolUnit and PoolUnitView
kugel3 Feb 27, 2024
45ab1f6
wip
kugel3 Feb 27, 2024
8932b0d
Use date ranges
kugel3 Feb 27, 2024
0942fc6
Small refactor
kugel3 Feb 28, 2024
d7289a7
wip
kugel3 Feb 28, 2024
67d24ca
Remove nasty special casing
kugel3 Feb 28, 2024
3c0f4ef
Remove tokenIcon init
kugel3 Feb 28, 2024
c5d7bb2
Remove includeAmount
kugel3 Feb 28, 2024
da6b96b
Refactor
kugel3 Feb 28, 2024
b7c5641
More refactor
kugel3 Feb 28, 2024
50086d4
fix account issue
kugel3 Feb 28, 2024
a5c493c
wip
kugel3 Feb 29, 2024
ff52661
Eliminate TransactionReview.Transfer
kugel3 Feb 29, 2024
e98a0d0
Eliminate StakeClaimNFTsView
kugel3 Feb 29, 2024
91ae058
Refactor
kugel3 Feb 29, 2024
13ada23
wip
kugel3 Mar 1, 2024
9d6f9f3
disable formatting test
kugel3 Mar 1, 2024
6b9a1b9
wip
kugel3 Mar 1, 2024
113511f
wip
kugel3 Mar 1, 2024
90d7f71
Refactor
kugel3 Mar 1, 2024
40bc1b5
wip
kugel3 Mar 2, 2024
55918fc
Deposit settings
kugel3 Mar 2, 2024
373ea4c
Refactoring complex resources
kugel3 Mar 2, 2024
8387dbc
Cleaning up
kugel3 Mar 2, 2024
7185c6c
All fungibles working
kugel3 Mar 3, 2024
273e228
Handles all resources
kugel3 Mar 3, 2024
0b45f13
Fall back on normal NFT for failed stake claims
kugel3 Mar 3, 2024
31743b3
Filter buttons
kugel3 Mar 3, 2024
3979a33
wip
kugel3 Mar 4, 2024
53b3cc4
wip
kugel3 Mar 4, 2024
b3fbc1e
wip
kugel3 Mar 4, 2024
4b96e2d
wip
kugel3 Mar 4, 2024
39c2b55
wip
kugel3 Mar 5, 2024
5ae954b
filter buttons
kugel3 Mar 5, 2024
0f1b1ba
wip
kugel3 Mar 5, 2024
2d363f1
rename
kugel3 Mar 5, 2024
c9a9bb2
hide details
kugel3 Mar 5, 2024
1f0de00
Simplify
kugel3 Mar 5, 2024
1c4004f
wip
kugel3 Mar 5, 2024
a212060
wip
kugel3 Mar 5, 2024
04e5f56
Refactor and align ResourceBalanceViews
kugel3 Mar 6, 2024
0c38bbb
Filters on history screen
kugel3 Mar 6, 2024
e96134d
Refactor
kugel3 Mar 6, 2024
f9c96d5
ImageResource
kugel3 Mar 6, 2024
29c4277
filters applied
kugel3 Mar 6, 2024
a8dbc4a
wip
kugel3 Mar 6, 2024
02a5095
asset filters
kugel3 Mar 6, 2024
2d7e722
wip
kugel3 Mar 6, 2024
cb4a5aa
remove crosses
kugel3 Mar 6, 2024
fb0cba7
More filter
kugel3 Mar 7, 2024
a31a6f9
Failed and empty transactions
kugel3 Mar 7, 2024
a303570
empty states
kugel3 Mar 7, 2024
56b2035
HeaderButtonStyle
kugel3 Mar 7, 2024
fb46ac1
revert crosses
kugel3 Mar 7, 2024
0840397
wip
kugel3 Mar 8, 2024
9398150
wip
kugel3 Mar 8, 2024
737e5a3
truncation
kugel3 Mar 8, 2024
5876557
remove some prints
kugel3 Mar 8, 2024
a6044bf
collapsing
kugel3 Mar 9, 2024
bd572d5
rename
kugel3 Mar 10, 2024
056b0de
icons
kugel3 Mar 10, 2024
ba5e6c1
filters
kugel3 Mar 10, 2024
1a82d64
more strings
kugel3 Mar 10, 2024
600e7dc
wip
kugel3 Mar 11, 2024
f07ff6f
Rewrite loading
kugel3 Mar 11, 2024
001ebfa
wip
kugel3 Mar 11, 2024
a8d4f4b
All new loading logic
kugel3 Mar 11, 2024
ef73664
color
kugel3 Mar 11, 2024
df3ee16
wip
kugel3 Mar 12, 2024
3f2bca1
resolved
kugel3 Mar 12, 2024
434213a
wip
kugel3 Mar 12, 2024
fa4ed34
WIP with all debug prints
kugel3 Mar 12, 2024
fcf3268
WIP removed most prints
kugel3 Mar 13, 2024
a8ef8d0
wip
kugel3 Mar 13, 2024
2770b29
remove reached bottom
kugel3 Mar 13, 2024
6465811
forward loading
kugel3 Mar 13, 2024
ba6e109
remove debug code
kugel3 Mar 13, 2024
a580f82
done
kugel3 Mar 13, 2024
92ba155
remove mock account
kugel3 Mar 13, 2024
17f07fa
small things
kugel3 Mar 13, 2024
879f51b
more fixes
kugel3 Mar 13, 2024
c525309
No pinned headers
kugel3 Mar 14, 2024
1302a48
TXID and better timestamp
kugel3 Mar 14, 2024
59eeb85
Open transaction summary on tap
kugel3 Mar 14, 2024
424b7b1
Fix filter layout
kugel3 Mar 14, 2024
72182b8
wip
kugel3 Mar 15, 2024
da88580
Scrolling and month
kugel3 Mar 15, 2024
7443417
Tap to open
kugel3 Mar 15, 2024
16679ab
wip scroll to transaction
kugel3 Mar 15, 2024
16ff11b
,
kugel3 Mar 15, 2024
5e4e672
scrolling up works sometimes
kugel3 Mar 15, 2024
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
116 changes: 84 additions & 32 deletions RadixWallet.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@ import Foundation

extension CoreAPI {
public struct BinaryPlaintextMessageContent: Codable, Hashable {
public private(set) var type: PlaintextMessageContentType
/** The hex-encoded value of a message that the author decided to provide as raw bytes. */
public private(set) var valueHex: String

public init(type: PlaintextMessageContentType, valueHex: String) {
self.type = type
public init(valueHex: String) {
self.valueHex = valueHex
}

public enum CodingKeys: String, CodingKey, CaseIterable {
case type
case valueHex = "value_hex"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ extension CoreAPI {
case type
}

public var string: String? {
guard case let .string(value) = self else { return nil }
return value.value
}

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ extension CoreAPI {
case type
}

public var plaintext: PlaintextTransactionMessage? {
guard case let .plaintext(value) = self else { return nil }
return value
}

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public typealias TransactionReceiptStatus = GatewayAPI.TransactionReceiptStatus
extension GatewayAPI {
/** The status of the transaction */
public enum TransactionReceiptStatus: String, Codable, CaseIterable {
case succeeded = "Succeeded"
case failed = "Failed"
case succeeded = "CommittedSuccess"
case failed = "CommittedFailure"
case rejected = "Rejected"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public struct GatewayAPIClient: Sendable, DependencyKey {
public var submitTransaction: SubmitTransaction
public var transactionStatus: GetTransactionStatus
public var transactionPreview: TransactionPreview
public var streamTransactions: StreamTransactions
}

extension GatewayAPIClient {
Expand All @@ -50,6 +51,7 @@ extension GatewayAPIClient {
public typealias SubmitTransaction = @Sendable (GatewayAPI.TransactionSubmitRequest) async throws -> GatewayAPI.TransactionSubmitResponse
public typealias GetTransactionStatus = @Sendable (GatewayAPI.TransactionStatusRequest) async throws -> GatewayAPI.TransactionStatusResponse
public typealias TransactionPreview = @Sendable (GatewayAPI.TransactionPreviewRequest) async throws -> GatewayAPI.TransactionPreviewResponse
public typealias StreamTransactions = @Sendable (GatewayAPI.StreamTransactionsRequest) async throws -> GatewayAPI.StreamTransactionsResponse
}

extension GatewayAPIClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,12 @@ extension GatewayAPIClient {
@Sendable
func post<Response>(
request: some Encodable,
dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
urlFromBase: @escaping @Sendable (URL) -> URL
) async throws -> Response
where
Response: Decodable
{
) async throws -> Response where Response: Decodable {
jsonEncoder.outputFormatting = [.prettyPrinted, .sortedKeys, .withoutEscapingSlashes]
jsonEncoder.dateEncodingStrategy = dateEncodingStrategy
let httpBody = try jsonEncoder.encode(request)

return try await makeRequest(httpBodyData: httpBody, urlFromBase: urlFromBase)
}

Expand Down Expand Up @@ -237,6 +235,12 @@ extension GatewayAPIClient {
try await post(
request: transactionPreviewRequest
) { $0.appendingPathComponent("transaction/preview") }
},
streamTransactions: { streamTransactionsRequest in
try await post(
request: streamTransactionsRequest,
dateEncodingStrategy: .iso8601
) { $0.appendingPathComponent("stream/transactions") }
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ extension GatewayAPIClient: TestDependencyKey {
getNonFungibleData: unimplemented("\(Self.self).getNonFungibleData"),
submitTransaction: unimplemented("\(Self.self).submitTransaction"),
transactionStatus: unimplemented("\(Self.self).transactionStatus"),
transactionPreview: unimplemented("\(Self.self).transactionPreview")
transactionPreview: unimplemented("\(Self.self).transactionPreview"),
streamTransactions: unimplemented("\(Self.self).streamTransactions")
)

// TODO: convert to noop, don't use in tests.
Expand Down Expand Up @@ -49,7 +50,8 @@ extension GatewayAPIClient: TestDependencyKey {
errorMessage: nil
)
},
transactionPreview: unimplemented("\(self).transactionPreview")
transactionPreview: unimplemented("\(self).transactionPreview"),
streamTransactions: unimplemented("\(self).streamTransactions")
)
}
}
Expand Down
Loading
Loading