form!
title "Buy Account Credit"

instructions(
	"Besides credit cards, we support payment by Bitcoin, postal mail, " \
	"or in Canada by Interac e-Transfer."
)

field(
	type: "fixed",
	value: "Current balance: $#{'%.4f' % @balance}"
)

render "alt_top_up/mailing_address"
render "alt_top_up/interac" if @currency == :CAD
render "alt_top_up/btc_addresses"
render "alt_top_up/bch_addresses"

field(
	var: "http://jabber.org/protocol/commands#actions",
	label: "Action",
	type: "list-single",
	options: [
		{ label: "Done", value: "complete" },
		{ label: "Add new Bitcoin address", value: "BTC" },
		{ label: "Add new Bitcoin Cash address", value: "BCH" },
		{ label: "Get single-use Monero address", value: "XMR" },
		{ label: "Get single-use Ethereum address", value: "ETH" }
	],
	value: "complete"
)
