Skip to content

Commit

Permalink
add pagination to account asset query
Browse files Browse the repository at this point in the history
Signed-off-by: Russel <[email protected]>
  • Loading branch information
ERussel committed Aug 9, 2019
1 parent dbe8ee2 commit 2d796be
Show file tree
Hide file tree
Showing 35 changed files with 1,220 additions and 89 deletions.
80 changes: 24 additions & 56 deletions Example/IrohaCommunication.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,8 @@
6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
7C8964A2BAE86B246752F5D5 /* Pods_UnitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 872B4DCAED8E7A58AFC8B200 /* Pods_UnitTests.framework */; };
844761D3224A4946009ADC0E /* IRInvalidSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761D2224A4946009ADC0E /* IRInvalidSerializationTests.m */; };
844761E7224A4EFF009ADC0E /* Block.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761D6224A4EFF009ADC0E /* Block.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
844761E8224A4EFF009ADC0E /* Endpoint.pbrpc.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761D8224A4EFF009ADC0E /* Endpoint.pbrpc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
844761E9224A4EFF009ADC0E /* QryResponses.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761DA224A4EFF009ADC0E /* QryResponses.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
844761EA224A4EFF009ADC0E /* Queries.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761DC224A4EFF009ADC0E /* Queries.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
844761EB224A4EFF009ADC0E /* Transaction.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761DD224A4EFF009ADC0E /* Transaction.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
844761EC224A4EFF009ADC0E /* Endpoint.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761DE224A4EFF009ADC0E /* Endpoint.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
844761ED224A4EFF009ADC0E /* Primitive.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761E0224A4EFF009ADC0E /* Primitive.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
844761EE224A4EFF009ADC0E /* Proposal.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761E2224A4EFF009ADC0E /* Proposal.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
844761EF224A4EFF009ADC0E /* Commands.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761E5224A4EFF009ADC0E /* Commands.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
844761F1224A5133009ADC0E /* IRQueryResponseDeserializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 844761F0224A5133009ADC0E /* IRQueryResponseDeserializationTests.m */; };
8481A59122FD48800056D3D4 /* IRAssetPaginationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8481A59022FD48800056D3D4 /* IRAssetPaginationTests.m */; };
84D693FB22EDCDB10059C1FB /* IRAccountRestoreWithBatchTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D693FA22EDCDB10059C1FB /* IRAccountRestoreWithBatchTest.m */; };
8CA1A478927FFA33BA30A5B4 /* Pods_IntegrationTestHost.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 175938D8DE70C85E0CEA25AF /* Pods_IntegrationTestHost.framework */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -152,25 +144,17 @@
6BF3097DA0B1239D7D3C0799 /* Pods-UnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UnitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests.release.xcconfig"; sourceTree = "<group>"; };
74D33D817C5F7989BD3071B1 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
844761D2224A4946009ADC0E /* IRInvalidSerializationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IRInvalidSerializationTests.m; sourceTree = "<group>"; };
844761D5224A4EFF009ADC0E /* Primitive.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Primitive.pbobjc.h; sourceTree = "<group>"; };
844761D6224A4EFF009ADC0E /* Block.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Block.pbobjc.m; sourceTree = "<group>"; };
844761D7224A4EFF009ADC0E /* Endpoint.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Endpoint.pbobjc.h; sourceTree = "<group>"; };
844761D8224A4EFF009ADC0E /* Endpoint.pbrpc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Endpoint.pbrpc.m; sourceTree = "<group>"; };
844761D9224A4EFF009ADC0E /* Proposal.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Proposal.pbobjc.h; sourceTree = "<group>"; };
844761DA224A4EFF009ADC0E /* QryResponses.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QryResponses.pbobjc.m; sourceTree = "<group>"; };
844761DB224A4EFF009ADC0E /* Commands.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Commands.pbobjc.h; sourceTree = "<group>"; };
844761DC224A4EFF009ADC0E /* Queries.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Queries.pbobjc.m; sourceTree = "<group>"; };
844761DD224A4EFF009ADC0E /* Transaction.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Transaction.pbobjc.m; sourceTree = "<group>"; };
844761DE224A4EFF009ADC0E /* Endpoint.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Endpoint.pbobjc.m; sourceTree = "<group>"; };
844761DF224A4EFF009ADC0E /* Block.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Block.pbobjc.h; sourceTree = "<group>"; };
844761E0224A4EFF009ADC0E /* Primitive.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Primitive.pbobjc.m; sourceTree = "<group>"; };
844761E1224A4EFF009ADC0E /* QryResponses.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QryResponses.pbobjc.h; sourceTree = "<group>"; };
844761E2224A4EFF009ADC0E /* Proposal.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Proposal.pbobjc.m; sourceTree = "<group>"; };
844761E3224A4EFF009ADC0E /* Endpoint.pbrpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Endpoint.pbrpc.h; sourceTree = "<group>"; };
844761E4224A4EFF009ADC0E /* Queries.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Queries.pbobjc.h; sourceTree = "<group>"; };
844761E5224A4EFF009ADC0E /* Commands.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Commands.pbobjc.m; sourceTree = "<group>"; };
844761E6224A4EFF009ADC0E /* Transaction.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Transaction.pbobjc.h; sourceTree = "<group>"; };
844761F0224A5133009ADC0E /* IRQueryResponseDeserializationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IRQueryResponseDeserializationTests.m; sourceTree = "<group>"; };
8481A59022FD48800056D3D4 /* IRAssetPaginationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IRAssetPaginationTests.m; sourceTree = "<group>"; };
8481A59322FD4D780056D3D4 /* Primitive.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Primitive.pbobjc.h; sourceTree = "<group>"; };
8481A59522FD4D790056D3D4 /* Endpoint.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Endpoint.pbobjc.h; sourceTree = "<group>"; };
8481A59722FD4D790056D3D4 /* Proposal.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Proposal.pbobjc.h; sourceTree = "<group>"; };
8481A59922FD4D790056D3D4 /* Commands.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Commands.pbobjc.h; sourceTree = "<group>"; };
8481A59D22FD4D790056D3D4 /* Block.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Block.pbobjc.h; sourceTree = "<group>"; };
8481A59F22FD4D790056D3D4 /* QryResponses.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QryResponses.pbobjc.h; sourceTree = "<group>"; };
8481A5A122FD4D790056D3D4 /* Endpoint.pbrpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Endpoint.pbrpc.h; sourceTree = "<group>"; };
8481A5A222FD4D790056D3D4 /* Queries.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Queries.pbobjc.h; sourceTree = "<group>"; };
8481A5A422FD4D790056D3D4 /* Transaction.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Transaction.pbobjc.h; sourceTree = "<group>"; };
84D693FA22EDCDB10059C1FB /* IRAccountRestoreWithBatchTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IRAccountRestoreWithBatchTest.m; sourceTree = "<group>"; };
84EA860F14455E442B5C9B29 /* IrohaCommunication.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = IrohaCommunication.podspec; path = ../IrohaCommunication.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
86F19532265991B547599707 /* Pods-IrohaExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IrohaExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-IrohaExample/Pods-IrohaExample.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -241,6 +225,7 @@
0200347421C8516F001A6A53 /* IRGrantablePermissionTests.m */,
0200347621C853E2001A6A53 /* IRRolePermissionTests.m */,
021C24AE21DCDDE3005D5304 /* IRPaginationTests.m */,
8481A59022FD48800056D3D4 /* IRAssetPaginationTests.m */,
021C24EF21DDF706005D5304 /* IRAccountAssetTests.m */,
);
name = Model;
Expand Down Expand Up @@ -415,7 +400,7 @@
6003F5B5195388D20070C39A /* Tests */ = {
isa = PBXGroup;
children = (
844761D4224A4EFF009ADC0E /* ProtoGen */,
8481A59222FD4D780056D3D4 /* ProtoGen */,
844761D1224A4946009ADC0E /* Serialization */,
021C24E621DD3C90005D5304 /* Query */,
02E319DB21DBB18500B33B66 /* Promise */,
Expand Down Expand Up @@ -456,27 +441,18 @@
path = ../../Tests/Serialization;
sourceTree = "<group>";
};
844761D4224A4EFF009ADC0E /* ProtoGen */ = {
8481A59222FD4D780056D3D4 /* ProtoGen */ = {
isa = PBXGroup;
children = (
844761D5224A4EFF009ADC0E /* Primitive.pbobjc.h */,
844761D6224A4EFF009ADC0E /* Block.pbobjc.m */,
844761D7224A4EFF009ADC0E /* Endpoint.pbobjc.h */,
844761D8224A4EFF009ADC0E /* Endpoint.pbrpc.m */,
844761D9224A4EFF009ADC0E /* Proposal.pbobjc.h */,
844761DA224A4EFF009ADC0E /* QryResponses.pbobjc.m */,
844761DB224A4EFF009ADC0E /* Commands.pbobjc.h */,
844761DC224A4EFF009ADC0E /* Queries.pbobjc.m */,
844761DD224A4EFF009ADC0E /* Transaction.pbobjc.m */,
844761DE224A4EFF009ADC0E /* Endpoint.pbobjc.m */,
844761DF224A4EFF009ADC0E /* Block.pbobjc.h */,
844761E0224A4EFF009ADC0E /* Primitive.pbobjc.m */,
844761E1224A4EFF009ADC0E /* QryResponses.pbobjc.h */,
844761E2224A4EFF009ADC0E /* Proposal.pbobjc.m */,
844761E3224A4EFF009ADC0E /* Endpoint.pbrpc.h */,
844761E4224A4EFF009ADC0E /* Queries.pbobjc.h */,
844761E5224A4EFF009ADC0E /* Commands.pbobjc.m */,
844761E6224A4EFF009ADC0E /* Transaction.pbobjc.h */,
8481A59322FD4D780056D3D4 /* Primitive.pbobjc.h */,
8481A59522FD4D790056D3D4 /* Endpoint.pbobjc.h */,
8481A59722FD4D790056D3D4 /* Proposal.pbobjc.h */,
8481A59922FD4D790056D3D4 /* Commands.pbobjc.h */,
8481A59D22FD4D790056D3D4 /* Block.pbobjc.h */,
8481A59F22FD4D790056D3D4 /* QryResponses.pbobjc.h */,
8481A5A122FD4D790056D3D4 /* Endpoint.pbrpc.h */,
8481A5A222FD4D790056D3D4 /* Queries.pbobjc.h */,
8481A5A422FD4D790056D3D4 /* Transaction.pbobjc.h */,
);
name = ProtoGen;
path = ../../ProtoGen;
Expand Down Expand Up @@ -854,27 +830,19 @@
files = (
02E3198B21D0FEF000B33B66 /* IRTransactionTests.m in Sources */,
0200346F21C840D1001A6A53 /* IRAmountTests.m in Sources */,
844761E7224A4EFF009ADC0E /* Block.pbobjc.m in Sources */,
02E319DD21DBB18500B33B66 /* IRPromiseTests.m in Sources */,
844761ED224A4EFF009ADC0E /* Primitive.pbobjc.m in Sources */,
0200347521C8516F001A6A53 /* IRGrantablePermissionTests.m in Sources */,
844761EC224A4EFF009ADC0E /* Endpoint.pbobjc.m in Sources */,
0200347121C849FF001A6A53 /* IRAssetIdTests.m in Sources */,
844761D3224A4946009ADC0E /* IRInvalidSerializationTests.m in Sources */,
844761EA224A4EFF009ADC0E /* Queries.pbobjc.m in Sources */,
8481A59122FD48800056D3D4 /* IRAssetPaginationTests.m in Sources */,
021C24E821DD3C90005D5304 /* IRQueryBuilderTests.m in Sources */,
844761E8224A4EFF009ADC0E /* Endpoint.pbrpc.m in Sources */,
844761EF224A4EFF009ADC0E /* Commands.pbobjc.m in Sources */,
0200347721C853E2001A6A53 /* IRRolePermissionTests.m in Sources */,
021C24F021DDF706005D5304 /* IRAccountAssetTests.m in Sources */,
0200345E21C62D3F001A6A53 /* IRDomainTests.m in Sources */,
844761E9224A4EFF009ADC0E /* QryResponses.pbobjc.m in Sources */,
021C843D21EA6E950037F633 /* IRBlockQueryBuilderTests.m in Sources */,
844761EB224A4EFF009ADC0E /* Transaction.pbobjc.m in Sources */,
0200345F21C62D3F001A6A53 /* IRAccountIdTests.m in Sources */,
844761F1224A5133009ADC0E /* IRQueryResponseDeserializationTests.m in Sources */,
0200346121C63F45001A6A53 /* IRAddressTests.m in Sources */,
844761EE224A4EFF009ADC0E /* Proposal.pbobjc.m in Sources */,
021C24AF21DCDDE3005D5304 /* IRPaginationTests.m in Sources */,
0200347321C84E5C001A6A53 /* IRRoleNameTests.m in Sources */,
);
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ PODS:
- gRPC/Main (1.11.0):
- gRPC-Core (= 1.11.0)
- gRPC-RxLibrary (= 1.11.0)
- IrohaCommunication (3.2.0):
- IrohaCommunication (3.4.0):
- BoringSSL (= 10.0.3)
- gRPC-ProtoRPC (= 1.11.0)
- IrohaCrypto
Expand Down Expand Up @@ -62,7 +62,7 @@ SPEC CHECKSUMS:
gRPC-Core: 164639cd8ae18ca8b65477fafb2efbaecf4f181a
gRPC-ProtoRPC: bb5fddf3424aa4fad74d76736578a79fe40e244e
gRPC-RxLibrary: 26d53d1b1f306befd4ad4e15bd6de27839a82481
IrohaCommunication: 80d8be2565e5bbd3446bdc5d2bdfb0e0849606e8
IrohaCommunication: 1519ba62909b1d8283244a6b9098b330bae2beab
IrohaCrypto: 4eb85b5edbf7667b5ffcef1b5104357f18ca8e81
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03
Expand Down
2 changes: 1 addition & 1 deletion IrohaCommunication.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'IrohaCommunication'
s.version = '3.3.0'
s.version = '3.4.0'
s.summary = 'Helper classes to use for communication with Iroha blockchain.'

s.homepage = 'https://github.com/hyperledger/iroha-ios'
Expand Down
15 changes: 14 additions & 1 deletion IrohaCommunication/Classes/Private/IRQueryResponse+Proto.m
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,20 @@ @implementation IRQueryResponseProtoFactory
[accountAssets addObject:accountAsset];
}

id<IRAssetId> nextAssetId = nil;

if (pbResponse.nextAssetId && pbResponse.nextAssetId.length > 0) {
NSError* error = nil;
nextAssetId = [IRAssetIdFactory assetWithIdentifier: pbResponse.nextAssetId error:&error];

if (error) {
return nil;
}
}

return [[IRAccountAssetsResponse alloc] initWithAccountAssets:accountAssets
totalCount:pbResponse.totalNumber
nextAssetId:nextAssetId
queryHash:queryHash];
}

Expand Down Expand Up @@ -361,7 +374,7 @@ @implementation IRQueryResponseProtoFactory

NSData *nextTransactionHash = nil;

if (pbResponse.nextTxHash) {
if (pbResponse.nextTxHash && pbResponse.nextTxHash.length > 0) {
nextTransactionHash = [[NSData alloc] initWithHexString:pbResponse.nextTxHash];

if (!nextTransactionHash) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

@interface IRGetAccountAssets : NSObject<IRGetAccountAssets, IRProtobufTransformable>

- (nonnull instancetype)initWithAccountId:(nonnull id<IRAccountId>)accountId;
- (nonnull instancetype)initWithAccountId:(nonnull id<IRAccountId>)accountId
pagination:(nullable id<IRAssetPagination>)pagination;

@end
13 changes: 12 additions & 1 deletion IrohaCommunication/Classes/Private/Queries/IRGetAccountAssets.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@

@implementation IRGetAccountAssets
@synthesize accountId = _accountId;
@synthesize pagination = _pagination;

- (nonnull instancetype)initWithAccountId:(nonnull id<IRAccountId>)accountId {
- (nonnull instancetype)initWithAccountId:(nonnull id<IRAccountId>)accountId
pagination:(nullable id<IRAssetPagination>)pagination {
if (self = [super init]) {
_accountId = accountId;
_pagination = pagination;
}

return self;
Expand All @@ -23,6 +26,14 @@ - (nullable id)transform:(NSError**)error {
GetAccountAssets *query = [[GetAccountAssets alloc] init];
query.accountId = [_accountId identifier];

if (_pagination) {
AssetPaginationMeta *meta = [[AssetPaginationMeta alloc] init];
meta.pageSize = _pagination.pageSize;
meta.firstAssetId = [_pagination.startingAssetId identifier];

query.paginationMeta = meta;
}

Query_Payload *payload = [[Query_Payload alloc] init];
payload.getAccountAssets = query;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
@interface IRAccountAssetsResponse : NSObject<IRAccountAssetsResponse>

- (nonnull instancetype)initWithAccountAssets:(nonnull NSArray<id<IRAccountAsset>>*)accountAssets
totalCount:(UInt32)totalCount
nextAssetId:(nullable id<IRAssetId>)assetId
queryHash:(nonnull NSData*)queryHash;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@

@implementation IRAccountAssetsResponse
@synthesize accountAssets = _accountAssets;
@synthesize totalCount = _totalCount;
@synthesize nextAssetId = _nextAssetId;
@synthesize queryHash = _queryHash;

- (nonnull instancetype)initWithAccountAssets:(NSArray<id<IRAccountAsset>> *)accountAssets
- (nonnull instancetype)initWithAccountAssets:(nonnull NSArray<id<IRAccountAsset>>*)accountAssets
totalCount:(UInt32)totalCount
nextAssetId:(nullable id<IRAssetId>)assetId
queryHash:(nonnull NSData*)queryHash {
if (self = [super init]) {
_accountAssets = accountAssets;
_totalCount = totalCount;
_nextAssetId = assetId;
_queryHash = queryHash;
}

Expand Down
5 changes: 4 additions & 1 deletion IrohaCommunication/Classes/Public/Builder/IRQueryBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ typedef NS_ENUM(NSUInteger, IRQueryBuilderError) {

- (nonnull instancetype)getTransactions:(nonnull NSArray<NSData*>*)hashes;

- (nonnull instancetype)getAccountAssets:(nonnull id<IRAccountId>)accountId;
- (nonnull instancetype)getAccountAssets:(nonnull id<IRAccountId>)accountId DEPRECATED_MSG_ATTRIBUTE("use getAccountAsset:pagination:");

- (nonnull instancetype)getAccountAssets:(nonnull id<IRAccountId>)accountId
pagination:(nullable id<IRAssetPagination>)pagination;

- (nonnull instancetype)getAccountDetail:(nullable id<IRAccountId>)accountId
writer:(nullable id<IRAccountId>)writer
Expand Down
Loading

0 comments on commit 2d796be

Please sign in to comment.