blockchainethereumblockchain-walleterc20erc721walletxdaidappdecentralizederc1155erc875iosswifttokens
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
711 B
27 lines
711 B
// Copyright SIX DAY LLC. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
class CoinbaseBuyWidget {
|
|
|
|
private let amount: Int
|
|
private let address: String
|
|
private let widgetCode: String
|
|
private let cryptoCurrency: String
|
|
|
|
var url: URL {
|
|
return URL(string: "https://buy.coinbase.com/widget?code=\(widgetCode)&amount=\(amount)&address=\(address)&crypto_currency=\(cryptoCurrency)")!
|
|
}
|
|
|
|
init(
|
|
amount: Int = 0,
|
|
address: String,
|
|
code: String = Constants.coinbaseWidgetCode,
|
|
cryptoCurrency: String = "ETH"
|
|
) {
|
|
self.amount = amount
|
|
self.address = address
|
|
self.widgetCode = code
|
|
self.cryptoCurrency = cryptoCurrency
|
|
}
|
|
}
|
|
|