mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-26 00:14:49 +01:00
42 lines
893 B
Swift
42 lines
893 B
Swift
//
|
|
// WalletInformation.swift
|
|
// BlueWalletWatch Extension
|
|
//
|
|
// Created by Marcos Rodriguez on 3/10/19.
|
|
|
|
//
|
|
|
|
import WatchKit
|
|
|
|
class WalletInformation: NSObject {
|
|
|
|
@IBOutlet weak var walletBalanceLabel: WKInterfaceLabel!
|
|
@IBOutlet private weak var walletNameLabel: WKInterfaceLabel!
|
|
@IBOutlet private weak var walletGroup: WKInterfaceGroup!
|
|
static let identifier: String = "WalletInformation"
|
|
let type: Wallet? = nil
|
|
|
|
var name: String = "" {
|
|
willSet {
|
|
walletNameLabel.setText(newValue)
|
|
}
|
|
}
|
|
|
|
var balance: String = "" {
|
|
willSet {
|
|
walletBalanceLabel.setText(newValue)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
// WalletInformation extension for configuration
|
|
extension WalletInformation {
|
|
func configure(with wallet: Wallet) {
|
|
walletBalanceLabel.setHidden(wallet.hideBalance)
|
|
name = wallet.label
|
|
balance = wallet.hideBalance ? "" : wallet.balance
|
|
}
|
|
}
|