Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

DP-701 queue #53

Open
wants to merge 54 commits into
base: epic/DP-665_batch-payments
Choose a base branch
from
Open

DP-701 queue #53

wants to merge 54 commits into from

Conversation

cnotethegr8
Copy link
Contributor

this is a pr mainly for the payments queue and its tests

@cnotethegr8 cnotethegr8 requested a review from yosriz September 2, 2019 08:08
throw KeyStoreErrors.noSecretKey
}

return try KeyUtils.sign(message: message, signingKey: signingKey)
}

fileprivate func secretKey(passphrase: String) -> [UInt8]? {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yosriz be aware of changes like this, removing the passphrase externally, in order to move the ios sdk closer to androids

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, make sure you run regression tests on import/export cause we don't have tests there (are we?)

- Parameter network: The `Network` to be used.
- Parameter appId: The `AppId` of the host application.
*/
public init(with nodeProviderUrl: URL, network: Network, appId: AppId) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yosriz another change to unify the sdks is removing the network function bubble in ios. using a shared singleton now like android.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general, the bubble is not necessarily a bad thing, that basically can serve as dependency injection (in our case we can't do it more nicely with a DI framework). the singleton is a thing we got from stellar.
anyway, a relatively new thing is that we want to avoid completely breaking the API, so please deprecate the old ones and do not remove completely.

@@ -126,6 +96,7 @@ public struct PaymentInfo {
Amount in `Kin` of the payment
*/
public var amount: Kin {
// ???: the amount should be quark going into kin and not kin into kin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yosriz this is a comment for me to look into at a later time. it appears at first glance like its wrong.

Copy link
Contributor

@yosriz yosriz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Payment queue seems good overall 👍
The tasks queue is not finished yet, so I didn't get down to small details, overall there should be:

  • implementing payments merging, might affect the way the OperationQueue works, as you cannot remove operation directly from the queue (can you update it?), we had a similar issue with Android, so, you can talk to Amitai as well if needed.
  • propagate fee from the QueueManager, fetch minimum if fee wasn't set.
  • implement interceptor mechanism (can be null, in the payment queue, there's a single one for every payments transaction, while in transaction params there's dedicated instance for each call (= transaction).
  • you should have eventually a test that fire payments like expected from the public API, and verify that transactions eventually land successfully/not successfully in the blockchain.
  • tests are failing now

KinSDK/KinSDK/BulkPayments/PaymentOperation.swift Outdated Show resolved Hide resolved
KinSDK/KinSDK/BulkPayments/BatchPaymentTransaction.swift Outdated Show resolved Hide resolved
KinSDK/KinSDK/BulkPayments/PaymentsQueueManager.swift Outdated Show resolved Hide resolved
KinSDK/KinSDK/blockchain/Watches.swift Outdated Show resolved Hide resolved
KinSDK/KinSDK/blockchain/types/TransactionFactory.swift Outdated Show resolved Hide resolved
KinSDKTests/PaymentsQueueManagerTests.swift Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants