An advanced Ethereum/EVM mobile wallet
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.
 
 
 
alpha-wallet-ios/Trust/Vendors/Coinbase/CoinbaseBuyWidget.swift

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
}
}