Add wallet page
With setup code to connect Blue Wallet to Kosmos account wallets
This commit is contained in:
21
app/controllers/wallet_controller.rb
Normal file
21
app/controllers/wallet_controller.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
require "rqrcode"
|
||||
|
||||
class WalletController < ApplicationController
|
||||
before_action :require_user_signed_in
|
||||
|
||||
def index
|
||||
@current_section = :wallet
|
||||
|
||||
@wallet_url = "lndhub://#{current_user.ln_login}:#{current_user.ln_password}@https://lndhub.kosmos.org"
|
||||
|
||||
qrcode = RQRCode::QRCode.new(@wallet_url)
|
||||
@svg = qrcode.as_svg(
|
||||
color: "000",
|
||||
shape_rendering: "crispEdges",
|
||||
module_size: 6,
|
||||
standalone: true,
|
||||
use_path: true
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user