Skip to content

Commit 7868cc8

Browse files
committed
feat: child accessibleToken model
1 parent affe645 commit 7868cc8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/Cadence/Cadence+Child.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public extension Flow {
4444
).decode()
4545
}
4646

47-
func getChildAccessibleToken(address: Flow.Address, parentAddress: Flow.Address) async throws -> [String: UInt64] {
47+
func getChildAccessibleToken(address: Flow.Address, parentAddress: Flow.Address) async throws -> [CadenceLoader.Category.Child.TokenInfo] {
4848
let script = try CadenceLoader.load(CadenceLoader.Category.Child.getAccessibleCoinInfo)
4949
return try await executeScriptAtLatestBlock(
5050
script: .init(text: script),
@@ -71,4 +71,9 @@ extension CadenceLoader.Category.Child {
7171
public struct Thumbnail: Codable {
7272
public let url: URL?
7373
}
74+
75+
public struct TokenInfo: Codable {
76+
public let id: String?
77+
public let balance: UInt64
78+
}
7479
}

0 commit comments

Comments
 (0)