-
Notifications
You must be signed in to change notification settings - Fork 41
Conversation
…ings work Just added the both files to login into Poloniex plus the bridging header needed for the signing of the requests
…ings work Just added the both files to login into Poloniex plus the bridging header needed for the signing of the requests
Added storing key/secret into keychain for poloniex
…s and work towards a shared hmac encryptation library
Create PoloniexAccount from internet Parse PoloniexAccount into Balance Account for display Create Number utils for number parsing Filter incoming acounts to not show 0 value
Expanding the institution creator to support non accessToken based logins
account test and helper
…les to the target
@@ -211,12 +211,12 @@ struct CoinbaseApi { | |||
for ca in coinbaseAccounts { | |||
// Calculate the number of decimals | |||
var decimals = 2 | |||
if let currency = Currency(rawValue: ca.currency) { | |||
if let currency = Currency.rawValue(currency: ca.currency) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the chance in syntax here? Swift 4 thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created my own method for raw value.
Since we have two enums, one is nested and the other is an attributed type.
Just tried to be similar than what we had before :)
case btc = "BTC" | ||
case ltc = "LTC" | ||
case eth = "ETH" | ||
static func rawValue(currency: String) -> Currency? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see now the API change... But why are we doing it this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically why the sub-enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was the only way I could find to have one defined enum with set of fixed values, and one that is flexible and takes anything you feed it.
That took more research than what it seems so I'd be super happy if there is a more elegant solution :)
@einsteinx2 i'll kill this one and promote the one that has merges, but we could merge this one first? |
Struct API
Takes secret and key from Poloniex.
Commands only fetchBalances
TODO:
Poloniex Response: Optional("{\"error\":\"Invalid API key\\/secret pair.\"}")
This is quite ready :D