change bitcoin_wallet_id to bitcoin_address
It is better to call it an address than a wallet ID, because the latter may confuse Bitcoin users who conflate the two. They are not the same. Also adds convenience method to handle the deprecated variable.
This commit is contained in:
parent
0cdfc7cfbd
commit
a4ce4404ff
7 changed files with 22 additions and 12 deletions
|
|
@ -11,7 +11,6 @@
|
|||
%option{:value => "Box o' Joe"} Box o' Joe : $20.00USD
|
||||
%input{:name => "currency_code", :type => "hidden", :value => "USD"}
|
||||
%input{:name => "submit", :type => "submit", :value => t('aspects.index.donate')}
|
||||
- if AppConfig.settings.bitcoin_wallet_id.present?
|
||||
- if AppConfig.bitcoin_donation_address
|
||||
Bitcoin:
|
||||
%input{:type => "text", :id => "bitcoin_address", :value => AppConfig.settings.bitcoin_wallet_id, :readonly => true}
|
||||
|
||||
%input{:type => "text", :id => "bitcoin_address", :value => AppConfig.bitcoin_donation_address, :readonly => true}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
.content
|
||||
!= t('bookmarklet.explanation', :link => link_to(t('bookmarklet.post_something'), magic_bookmarklet_link))
|
||||
|
||||
- if AppConfig.settings.paypal_hosted_button_id.present? || AppConfig.settings.bitcoin_wallet_id.present?
|
||||
- if AppConfig.settings.paypal_hosted_button_id.present? || AppConfig.bitcoin_donation_address
|
||||
.section
|
||||
.title
|
||||
.icons-coffee
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ defaults:
|
|||
open: true
|
||||
count: 25
|
||||
paypal_hosted_button_id:
|
||||
bitcoin_wallet_id:
|
||||
bitcoin_address:
|
||||
community_spotlight:
|
||||
enable: false
|
||||
suggest_email:
|
||||
|
|
|
|||
|
|
@ -237,9 +237,9 @@ configuration: ## Section
|
|||
#paypal_hosted_button_id: ""
|
||||
|
||||
## Bitcoin donations
|
||||
## You can provide the bitcoin address here to kindly ask
|
||||
## You can provide a bitcoin address here to kindly ask
|
||||
## your users for donations to run their pod.
|
||||
#bitcoin_wallet_id: ""
|
||||
#bitcoin_address: ""
|
||||
|
||||
## Community Spotlight
|
||||
## The community spotlight gives new users a starting point on who
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ Feature: donations
|
|||
And I sign in as "alice@alice.alice"
|
||||
|
||||
Scenario: Bitcoin donations
|
||||
Given I have configured a Bitcoin wallet
|
||||
Given I have configured a Bitcoin address
|
||||
And I am on the home page
|
||||
Then I should see the Bitcoin wallet ID
|
||||
Then I should see the Bitcoin address
|
||||
|
|
|
|||
|
|
@ -271,10 +271,10 @@ When /^I focus the "([^"]+)" field$/ do |field|
|
|||
find_field(field).click
|
||||
end
|
||||
|
||||
Given /^I have configured a Bitcoin wallet$/ do
|
||||
AppConfig.settings.bitcoin_wallet_id = "AAAAAA"
|
||||
Given /^I have configured a Bitcoin address$/ do
|
||||
AppConfig.settings.bitcoin_address = "AAAAAA"
|
||||
end
|
||||
|
||||
Then /^I should see the Bitcoin wallet ID$/ do
|
||||
Then /^I should see the Bitcoin address$/ do
|
||||
find("#bitcoin_address")['value'].should == "AAAAAA"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -109,6 +109,17 @@ module Configuration
|
|||
ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
|
||||
end
|
||||
|
||||
def bitcoin_donation_address
|
||||
if AppConfig.settings.bitcoin_wallet_id.present?
|
||||
$stderr.puts "WARNING: bitcoin_wallet_id is now bitcoin_address. Change in diaspora.yml."
|
||||
return AppConfig.settings.bitcoin_wallet_id
|
||||
end
|
||||
|
||||
if AppConfig.settings.bitcoin_address.present?
|
||||
AppConfig.settings.bitcoin_address
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def get_git_info
|
||||
|
|
|
|||
Loading…
Reference in a new issue