mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 07:15:35 +01:00
Merge branch 'master' into Thai-translation
This commit is contained in:
commit
2aece4cfda
10 changed files with 427 additions and 119 deletions
|
@ -247,4 +247,69 @@ describe('LightningCustodianWallet', () => {
|
||||||
assert.equal(lOld.balance - oldBalance, 1);
|
assert.equal(lOld.balance - oldBalance, 1);
|
||||||
assert.equal(lNew.balance, 0);
|
assert.equal(lNew.balance, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('can pay free amount (tip) invoice', async function() {
|
||||||
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 100 * 1000;
|
||||||
|
if (!process.env.BLITZHUB) {
|
||||||
|
console.error('process.env.BLITZHUB not set, skipped');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// fetchig invoice from tippin.me :
|
||||||
|
|
||||||
|
const api = new Frisbee({
|
||||||
|
baseURI: 'https://tippin.me',
|
||||||
|
});
|
||||||
|
const res = await api.post('/lndreq/newinvoice.php', {
|
||||||
|
headers: {
|
||||||
|
Origin: 'https://tippin.me',
|
||||||
|
'Accept-Encoding': 'gzip, deflate, br',
|
||||||
|
'Accept-Language': 'en-GB,en-US;q=0.9,en;q=0.8',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||||
|
Accept: 'application/json, text/javascript, */*; q=0.01',
|
||||||
|
},
|
||||||
|
body: 'userid=1188&username=overtorment&istaco=0&customAmnt=0&customMemo=',
|
||||||
|
});
|
||||||
|
|
||||||
|
let json;
|
||||||
|
let invoice;
|
||||||
|
if (res && res.body && (json = JSON.parse(res.body)) && json.message) {
|
||||||
|
invoice = json.message;
|
||||||
|
} else {
|
||||||
|
throw new Error('tippin.me problem: ' + JSON.stringify(res));
|
||||||
|
}
|
||||||
|
|
||||||
|
// --> use to pay specific invoice
|
||||||
|
// invoice =
|
||||||
|
// 'lnbc1pwrp35spp5z62nvj8yw6luq7ns4a8utpwn2qkkdwdt0ludwm54wjeazk2xv5wsdpu235hqurfdcsx7an9wf6x7undv4h8ggpgw35hqurfdchx6eff9p6nzvfc8q5scqzysxqyz5vqj8xq6wz6dezmunw6qxleuw67ensjnt3fldltrmmkvzurge0dczpn94fkwwh7hkh5wqrhsvfegtvhswn252hn6uw5kx99dyumz4v5n9sp337py2';
|
||||||
|
|
||||||
|
let l2 = new LightningCustodianWallet();
|
||||||
|
l2.setSecret(process.env.BLITZHUB);
|
||||||
|
await l2.authorize();
|
||||||
|
await l2.fetchTransactions();
|
||||||
|
await l2.fetchBalance();
|
||||||
|
let oldBalance = +l2.balance;
|
||||||
|
let txLen = l2.transactions_raw.length;
|
||||||
|
|
||||||
|
let decoded = await l2.decodeInvoice(invoice);
|
||||||
|
assert.ok(decoded.payment_hash);
|
||||||
|
assert.ok(decoded.description);
|
||||||
|
assert.equal(+decoded.num_satoshis, 0);
|
||||||
|
|
||||||
|
await l2.checkRouteInvoice(invoice);
|
||||||
|
|
||||||
|
let start = +new Date();
|
||||||
|
await l2.payInvoice(invoice, 3);
|
||||||
|
let end = +new Date();
|
||||||
|
if ((end - start) / 1000 > 9) {
|
||||||
|
console.warn('payInvoice took', (end - start) / 1000, 'sec');
|
||||||
|
}
|
||||||
|
|
||||||
|
await l2.fetchTransactions();
|
||||||
|
assert.equal(l2.transactions_raw.length, txLen + 1);
|
||||||
|
// transactions became more after paying an invoice
|
||||||
|
|
||||||
|
await l2.fetchBalance();
|
||||||
|
assert.equal(oldBalance - l2.balance, 3);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -102,9 +102,9 @@ export class LightningCustodianWallet extends LegacyWallet {
|
||||||
this.secret = 'lndhub://' + json.login + ':' + json.password;
|
this.secret = 'lndhub://' + json.login + ':' + json.password;
|
||||||
}
|
}
|
||||||
|
|
||||||
async payInvoice(invoice) {
|
async payInvoice(invoice, freeAmount = 0) {
|
||||||
let response = await this._api.post('/payinvoice', {
|
let response = await this._api.post('/payinvoice', {
|
||||||
body: { invoice: invoice },
|
body: { invoice: invoice, amount: freeAmount },
|
||||||
headers: {
|
headers: {
|
||||||
'Access-Control-Allow-Origin': '*',
|
'Access-Control-Allow-Origin': '*',
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|
|
@ -30,7 +30,8 @@ let strings;
|
||||||
locale === 'pt-pt' ||
|
locale === 'pt-pt' ||
|
||||||
locale === 'de-de' ||
|
locale === 'de-de' ||
|
||||||
locale === 'cs-cz' ||
|
locale === 'cs-cz' ||
|
||||||
locale === 'th-th'
|
locale === 'th-th' ||
|
||||||
|
locale === 'nl-nl'
|
||||||
) {
|
) {
|
||||||
locale = locale.replace('-', '_');
|
locale = locale.replace('-', '_');
|
||||||
strings.setLanguage(locale);
|
strings.setLanguage(locale);
|
||||||
|
@ -51,6 +52,7 @@ strings = new Localization({
|
||||||
de_de: require('./de_DE.js'),
|
de_de: require('./de_DE.js'),
|
||||||
cs_cz: require('./cs_CZ.js'),
|
cs_cz: require('./cs_CZ.js'),
|
||||||
th_th: require('./th_TH.js'),
|
th_th: require('./th_TH.js'),
|
||||||
|
nl_nl: require('./nl_NL.js'),
|
||||||
});
|
});
|
||||||
|
|
||||||
strings.saveLanguage = lang => AsyncStorage.setItem(AppStorage.LANG, lang);
|
strings.saveLanguage = lang => AsyncStorage.setItem(AppStorage.LANG, lang);
|
||||||
|
|
215
loc/nl_NL.js
Normal file
215
loc/nl_NL.js
Normal file
|
@ -0,0 +1,215 @@
|
||||||
|
module.exports = {
|
||||||
|
_: {
|
||||||
|
storage_is_encrypted: 'Uw opslag is versleuteld. Wachtwoord is vereist om het te ontcijferen',
|
||||||
|
enter_password: 'Voer wachtwoord in',
|
||||||
|
bad_password: 'Verkeerd wachtwoord, probeer opnieuw',
|
||||||
|
months_ago: 'maanden geleden',
|
||||||
|
days_ago: 'dagen geleden',
|
||||||
|
hours_ago: 'uur geleden',
|
||||||
|
minutes_ago: 'minuten geleden',
|
||||||
|
never: 'nooit',
|
||||||
|
},
|
||||||
|
wallets: {
|
||||||
|
select_wallet: 'Selecteer portemonnee',
|
||||||
|
options: 'opties',
|
||||||
|
list: {
|
||||||
|
app_name: 'Blue Wallet',
|
||||||
|
title: 'portemonnees',
|
||||||
|
header: 'Een portemonnee vertegenwoordigt een geheime (privésleutel) en een adres' + 'dat u kunt delen om munten te ontvangen.',
|
||||||
|
add: 'Portemonnee toevoegen',
|
||||||
|
create_a_wallet: 'Portemonnee aanmaken',
|
||||||
|
create_a_wallet1: "Het is gratis en u kunt er",
|
||||||
|
create_a_wallet2: 'zoveel maken als u wilt',
|
||||||
|
latest_transaction: 'laatste transactie',
|
||||||
|
empty_txs1: 'Uw transacties verschijnen hier,',
|
||||||
|
empty_txs2: 'geen transacties op dit moment',
|
||||||
|
tap_here_to_buy: 'Klik hier om Bitcoin te kopen',
|
||||||
|
},
|
||||||
|
reorder: {
|
||||||
|
title: 'Portemonnees opnieuw ordenen',
|
||||||
|
},
|
||||||
|
add: {
|
||||||
|
title: 'portemonnee toevoegen',
|
||||||
|
description:
|
||||||
|
'U kunt een back-up papieren portemonnee scannen (in WIF - Wallet Import Format) of een nieuwe portemonnee maken. Segwit-wallets worden standaard ondersteund.',
|
||||||
|
scan: 'Scannen',
|
||||||
|
create: 'Aanmaken',
|
||||||
|
label_new_segwit: 'Nieuwe SegWit',
|
||||||
|
label_new_lightning: 'Nieuwe Lightning',
|
||||||
|
wallet_name: 'portemonnee naam',
|
||||||
|
wallet_type: 'type',
|
||||||
|
or: 'of',
|
||||||
|
import_wallet: 'Portemonnee importeren',
|
||||||
|
imported: 'Geïmporteerd',
|
||||||
|
coming_soon: 'Komt binnenkort',
|
||||||
|
lightning: 'Lightning',
|
||||||
|
bitcoin: 'Bitcoin',
|
||||||
|
},
|
||||||
|
details: {
|
||||||
|
title: 'Portemonnee',
|
||||||
|
address: 'Adres',
|
||||||
|
type: 'Type',
|
||||||
|
label: 'Label',
|
||||||
|
destination: 'bestemming',
|
||||||
|
description: 'beschrijving',
|
||||||
|
are_you_sure: 'Weet u het zeker?',
|
||||||
|
yes_delete: 'Ja, verwijderen',
|
||||||
|
no_cancel: 'Nee, annuleren',
|
||||||
|
delete: 'Verwijderen',
|
||||||
|
save: 'Opslaan',
|
||||||
|
delete_this_wallet: 'Verwijder deze portemonnee',
|
||||||
|
export_backup: 'Exporteren / back-up maken',
|
||||||
|
buy_bitcoin: 'Koop Bitcoin',
|
||||||
|
show_xpub: 'Toon portemonnee XPUB',
|
||||||
|
},
|
||||||
|
export: {
|
||||||
|
title: 'portemonnee exporteren',
|
||||||
|
},
|
||||||
|
xpub: {
|
||||||
|
title: 'portemonnee XPUB',
|
||||||
|
copiedToClipboard: 'Gekopieerd naar het klembord.',
|
||||||
|
},
|
||||||
|
import: {
|
||||||
|
title: 'importeren',
|
||||||
|
explanation:
|
||||||
|
"Schrijf hier uw ezelsbruggetje, privésleutel, WIF, of een ander formaat. BlueWallet zal zijn best doen om het juiste formaat te raden en uw portemonnee te importeren",
|
||||||
|
imported: 'Geïmporteerd',
|
||||||
|
error: 'Importeren mislukt. Zorg ervoor dat de verstrekte gegevens geldig zijn.',
|
||||||
|
success: 'Succes',
|
||||||
|
do_import: 'Importeren',
|
||||||
|
scan_qr: 'of QR-code scannen?',
|
||||||
|
},
|
||||||
|
scanQrWif: {
|
||||||
|
go_back: 'Ga terug',
|
||||||
|
cancel: 'Annuleren',
|
||||||
|
decoding: 'Decoderen',
|
||||||
|
input_password: 'Voer wachtwoord in',
|
||||||
|
password_explain: 'Dit is een BIP38-gecodeerde privésleutel',
|
||||||
|
bad_password: 'Verkeerd wachtwoord',
|
||||||
|
wallet_already_exists: 'Zo\'n portemonnee bestaat al',
|
||||||
|
bad_wif: 'Verkeerde WIF',
|
||||||
|
imported_wif: 'WIF geïmporteerd ',
|
||||||
|
with_address: ' met adres ',
|
||||||
|
imported_segwit: 'SegWit geïmporteerd',
|
||||||
|
imported_legacy: 'Legacy geïmporteerd',
|
||||||
|
imported_watchonly: 'Watch-only geïmporteerd',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
transactions: {
|
||||||
|
list: {
|
||||||
|
tabBarLabel: 'Transacties',
|
||||||
|
title: 'transacties',
|
||||||
|
description: 'Een lijst met ingaande of uitgaande transacties van uw portemonnee',
|
||||||
|
conf: 'conf',
|
||||||
|
},
|
||||||
|
details: {
|
||||||
|
title: 'Transacties',
|
||||||
|
from: 'Invoer',
|
||||||
|
to: 'Uitgang',
|
||||||
|
copy: 'Kopiëren',
|
||||||
|
transaction_details: 'Transactie details',
|
||||||
|
show_in_block_explorer: 'Weergeven in blokverkenner',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
send: {
|
||||||
|
header: 'Vertuur',
|
||||||
|
details: {
|
||||||
|
title: 'transacties aanmaken',
|
||||||
|
amount_field_is_not_valid: 'Bedrag veld is niet geldig',
|
||||||
|
fee_field_is_not_valid: 'Tarief is niet geldig',
|
||||||
|
address_field_is_not_valid: 'Adresveld is niet geldig',
|
||||||
|
total_exceeds_balance: 'Het verzendingsbedrag overschrijdt het beschikbare saldo.',
|
||||||
|
create_tx_error: 'Er is een fout opgetreden bij het maken van de transactie. Zorg ervoor dat het adres geldig is.',
|
||||||
|
address: 'adres',
|
||||||
|
amount_placeholder: 'te verzenden bedrag (in BTC)',
|
||||||
|
fee_placeholder: 'plus transactie vergoeding (in BTC)',
|
||||||
|
note_placeholder: 'notitie voor mezelf',
|
||||||
|
cancel: 'Annuleren',
|
||||||
|
scan: 'Scannen',
|
||||||
|
send: 'Verzenden',
|
||||||
|
create: 'Aanmaken',
|
||||||
|
remaining_balance: 'Resterende saldo',
|
||||||
|
},
|
||||||
|
confirm: {
|
||||||
|
header: 'Bevestig',
|
||||||
|
sendNow: 'Nu verzenden',
|
||||||
|
},
|
||||||
|
success: {
|
||||||
|
done: 'Klaar',
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
details: 'Details',
|
||||||
|
title: 'transactie aanmaken',
|
||||||
|
error: 'Fout bij het maken van transactie. Ongeldig adres of bedrag?',
|
||||||
|
go_back: 'Ga terug',
|
||||||
|
this_is_hex: 'Dit is de transactie-hex, ondertekend en klaar om op het netwerk te worden uitgezonden.',
|
||||||
|
to: 'Naar',
|
||||||
|
amount: 'Bedrag',
|
||||||
|
fee: 'Vergoeding',
|
||||||
|
tx_size: 'TX grootte',
|
||||||
|
satoshi_per_byte: 'Satoshi per byte',
|
||||||
|
memo: 'Memo',
|
||||||
|
broadcast: 'Uitzenden',
|
||||||
|
not_enough_fee: 'Niet genoeg vergoeding. Verhoog de vergoeding',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
receive: {
|
||||||
|
header: 'Ontvang',
|
||||||
|
details: {
|
||||||
|
title: 'Deel dit adres met betaler',
|
||||||
|
share: 'delen',
|
||||||
|
copiedToClipboard: 'Gekopieerd naar het klembord.',
|
||||||
|
label: 'Omschrijving',
|
||||||
|
setAmount: 'Ontvang met bedrag',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
buyBitcoin: {
|
||||||
|
header: 'Koop Bitcoin',
|
||||||
|
tap_your_address: 'Tik op uw adres om het naar het klembord te kopiëren:',
|
||||||
|
copied: 'Gekopieerd naar het klembord!',
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
header: 'instellingen',
|
||||||
|
plausible_deniability: 'Plausibele ontkenning...',
|
||||||
|
storage_not_encrypted: 'Opslag: niet versleuteld',
|
||||||
|
storage_encrypted: 'Opslag: versleuteld',
|
||||||
|
password: 'Wachtwoord',
|
||||||
|
password_explain: 'Maak een wachtwoord aan dat u wilt gebruiken om de opslag te versleutelen',
|
||||||
|
retype_password: 'Geef nogmaals het wachtwoord',
|
||||||
|
passwords_do_not_match: 'Wachtwoorden komen niet overeen',
|
||||||
|
encrypt_storage: 'Versleutel opslag',
|
||||||
|
about: 'Over',
|
||||||
|
language: 'Taal',
|
||||||
|
currency: 'Valuta',
|
||||||
|
},
|
||||||
|
plausibledeniability: {
|
||||||
|
title: 'Plausibele ontkenning',
|
||||||
|
help:
|
||||||
|
'Onder bepaalde omstandigheden kunt u worden gedwongen om uw' +
|
||||||
|
' wachtwoord te onthullen. Om uw munten veilig te houden, kan ' +
|
||||||
|
'BlueWallet nog een versleutelde opslag aanmaken, met een ander ' +
|
||||||
|
'wachtwoord. Onder druk kunt u dit wachtwoord bekendmaken aan ' +
|
||||||
|
'de derde partij. Indien ingevoerd in BlueWallet, zal het nieuwe ' +
|
||||||
|
"nep'-opslagruimte worden ontgrendeld. Dit lijkt legitiem voor de " +
|
||||||
|
'derde partij, maar zal uw hoofdopslag met munten niet bekend maken ' +
|
||||||
|
'aan de derde partij',
|
||||||
|
help2: 'De nieuwe opslag zal volledig functioneel zijn en u kunt er ' + 'een minimum aantal munten opslaan zodat het geloofwaardig lijkt.',
|
||||||
|
create_fake_storage: 'Nep versleutelde opslag aanmaken',
|
||||||
|
go_back: 'Ga terug',
|
||||||
|
create_password: 'Wachtwoord aanmaken',
|
||||||
|
create_password_explanation: 'Wachtwoord voor nep-opslag hoort niet overeen te komen met wachtwoord voor uw hoofdopslag',
|
||||||
|
password_should_not_match: 'Wachtwoord voor nep-opslag hoort niet overeen te komen met wachtwoord voor uw hoofdopslag',
|
||||||
|
retype_password: 'Herhaal wachtwoord',
|
||||||
|
passwords_do_not_match: 'Wachtwoorden komen niet overeen, probeer het opnieuw',
|
||||||
|
success: 'Succes',
|
||||||
|
},
|
||||||
|
lnd: {
|
||||||
|
title: 'fondsen beheren',
|
||||||
|
choose_source_wallet: 'Kies een bron portemonnee',
|
||||||
|
refill_lnd_balance: 'Vul Lightning-portemonneesaldo bij',
|
||||||
|
refill: 'Bijvullen',
|
||||||
|
withdraw: 'Opvragen',
|
||||||
|
expired: 'Verlopen',
|
||||||
|
sameWalletAsInvoiceError: 'U kunt geen factuur betalen met dezelfde portemonnee die is gebruikt om de factuur te maken.',
|
||||||
|
},
|
||||||
|
};
|
214
loc/pt_BR.js
214
loc/pt_BR.js
|
@ -1,125 +1,125 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
_: {
|
_: {
|
||||||
storage_is_encrypted: 'O armazenamento está encriptado. Uma password é necessaria para desencriptar',
|
storage_is_encrypted: 'Os arquivos estão criptografados, é necessária uma senha',
|
||||||
enter_password: 'Inserir password',
|
enter_password: 'Inserir senha',
|
||||||
bad_password: 'pasword errada, tentar novamente',
|
bad_password: 'Senha errada, tente outra vez',
|
||||||
months_ago: 'meses atrás',
|
months_ago: 'meses atrás',
|
||||||
days_ago: 'dias atrás',
|
days_ago: 'dias atrás',
|
||||||
hours_ago: 'horas atrás',
|
hours_ago: 'horas atrás',
|
||||||
minutes_ago: 'minutos',
|
minutes_ago: 'minutos atrás',
|
||||||
never: 'nunca...',
|
never: 'nunca',
|
||||||
},
|
},
|
||||||
wallets: {
|
wallets: {
|
||||||
options: 'options',
|
options: 'opções',
|
||||||
select_wallet: 'Select Wallet',
|
select_wallet: 'Escolher carteira',
|
||||||
list: {
|
list: {
|
||||||
tabBarLabel: 'Wallets',
|
tabBarLabel: 'Carteiras',
|
||||||
app_name: 'Blue Wallet',
|
app_name: 'Blue Wallet',
|
||||||
title: 'Wallets',
|
title: 'carteiras',
|
||||||
header: 'Uma wallet representa um par entre um segredo (chave privada) e um endereço' + 'que pode partilhar para receber Bitcoin.',
|
header: 'Uma carteira representa um par composto de uma chave privada e um endereço que você pode .',
|
||||||
add: 'adicionar wallet',
|
add: 'adicionar wallet',
|
||||||
create_a_wallet: 'Criar uma wallet',
|
create_a_wallet: 'Criar uma carteira',
|
||||||
create_a_wallet1: 'Gratuito e pode criar',
|
create_a_wallet1: 'é grátis e você pode criar',
|
||||||
create_a_wallet2: ' quantas quiser',
|
create_a_wallet2: 'quantas você quiser',
|
||||||
latest_transaction: 'última transação',
|
latest_transaction: 'última transação',
|
||||||
empty_txs1: 'Suas transações aparecerão aqui',
|
empty_txs1: 'Suas transações aparecerão aqui,',
|
||||||
empty_txs2: 'nenhuma de momento',
|
empty_txs2: 'nenhuma no momento',
|
||||||
tap_here_to_buy: 'Tap here to buy Bitcoin',
|
tap_here_to_buy: 'Toque aqui para comprar Bitcoin',
|
||||||
},
|
},
|
||||||
reorder: {
|
reorder: {
|
||||||
title: 'Reorder Wallets',
|
title: 'Reordenar carteiras',
|
||||||
},
|
},
|
||||||
add: {
|
add: {
|
||||||
title: 'Adicionar Wallet',
|
title: 'criando carteira',
|
||||||
description:
|
description:
|
||||||
'Pode fazer um scaneamento de um backup de uma wallet em papel (em WIF - Wallet Import Format), ou criar uma nova wallet. Segwit suportado por defeito.',
|
'Você pode ler o backup de uma carteira (em WIF - Wallet Import Format) ou criar uma nova. O padrão é criar uma carteira SegWit.',
|
||||||
scan: 'Scanear',
|
scan: 'Ler backup',
|
||||||
create: 'Criar',
|
create: 'Criar',
|
||||||
label_new_segwit: 'Novo SegWit',
|
label_new_segwit: 'Nova carteira SegWit',
|
||||||
label_new_lightning: 'Novo Lightning',
|
label_new_lightning: 'Nova carteira Lightning',
|
||||||
wallet_name: 'Nome',
|
wallet_name: 'nome',
|
||||||
wallet_type: 'Tipo',
|
wallet_type: 'tipo',
|
||||||
or: 'ou',
|
or: 'ou',
|
||||||
import_wallet: 'Importar wallet',
|
import_wallet: 'Importar carteira',
|
||||||
imported: 'Importado',
|
imported: 'Importado',
|
||||||
coming_soon: 'Brevemente',
|
coming_soon: 'Em breve',
|
||||||
lightning: 'Lightning',
|
lightning: 'Lightning',
|
||||||
bitcoin: 'Bitcoin',
|
bitcoin: 'Bitcoin',
|
||||||
},
|
},
|
||||||
details: {
|
details: {
|
||||||
title: 'wallet',
|
title: 'Carteira',
|
||||||
address: 'Endereço',
|
address: 'Endereço',
|
||||||
type: 'Tipo',
|
type: 'Tipo',
|
||||||
destination: 'destination',
|
destination: 'destino',
|
||||||
description: 'description',
|
description: 'descrição',
|
||||||
label: 'Nome',
|
label: 'Nome',
|
||||||
are_you_sure: 'Tem a certeza?',
|
are_you_sure: 'Tem certeza?',
|
||||||
yes_delete: 'Sim, eliminar',
|
yes_delete: 'Sim, apagar',
|
||||||
no_cancel: 'Não, cancelar',
|
no_cancel: 'Não, cancelar',
|
||||||
delete_this_wallet: 'Apagar esta wallet',
|
delete_this_wallet: 'Apagar esta carteira',
|
||||||
export_backup: 'Exportar / backup',
|
export_backup: 'Exportar / backup',
|
||||||
buy_bitcoin: 'Buy Bitcoin',
|
buy_bitcoin: 'Comprar Bitcoin',
|
||||||
show_xpub: 'Show wallet XPUB',
|
show_xpub: 'Ver XPUB',
|
||||||
delete: 'Delete',
|
delete: 'Apagar',
|
||||||
save: 'Save',
|
save: 'Salvar',
|
||||||
},
|
},
|
||||||
export: {
|
export: {
|
||||||
title: 'Exportar Wallet',
|
title: 'Exportar carteira',
|
||||||
},
|
},
|
||||||
xpub: {
|
xpub: {
|
||||||
title: 'wallet XPUB',
|
title: 'XPUB',
|
||||||
copiedToClipboard: 'copiado para clip board',
|
copiedToClipboard: 'Copiado para a área de transferência',
|
||||||
},
|
},
|
||||||
import: {
|
import: {
|
||||||
title: 'importar',
|
title: 'importar',
|
||||||
explanation:
|
explanation:
|
||||||
'Escreva aqui sua frase mnemônica, chave privada, WIF, etc. Vamos fazer nosso melhor para importat a sua wallet em qualquer formato',
|
'Escreva aqui sua frase mnemônica, chave privada, WIF, ou o que você tiver. Faremos nosso melhor para adivinhar o formato e importat sua carteira',
|
||||||
imported: 'Importada',
|
imported: 'Importada',
|
||||||
error: 'Falhou. é um formato válido?',
|
error: 'Erro. Por favor, confira se o formato que você passou é válido.',
|
||||||
success: 'Sucesso',
|
success: 'Sucesso',
|
||||||
do_import: 'Importar',
|
do_import: 'Importar',
|
||||||
scan_qr: 'ou scan um QR code?',
|
scan_qr: 'ou ler um código QR?',
|
||||||
},
|
},
|
||||||
scanQrWif: {
|
scanQrWif: {
|
||||||
go_back: 'Voltar',
|
go_back: 'Voltar',
|
||||||
cancel: 'Cancelar',
|
cancel: 'Cancelar',
|
||||||
decoding: 'Descodificar',
|
decoding: 'Decodificar',
|
||||||
input_password: 'Inserir password',
|
input_password: 'Inserir senha',
|
||||||
password_explain: 'Isto é um BIP38 chave privada encriptada',
|
password_explain: 'Isto é um chave privada criptografada BIP38',
|
||||||
bad_password: 'Password errada',
|
bad_password: 'Senha errada',
|
||||||
wallet_already_exists: 'Esta wallet já existe',
|
wallet_already_exists: 'Esta carteira já existe',
|
||||||
bad_wif: 'WIF errado',
|
bad_wif: 'WIF errado',
|
||||||
imported_wif: 'WIF transferido ',
|
imported_wif: 'WIF importado ',
|
||||||
with_address: ' com endereço ',
|
with_address: ' com endereço ',
|
||||||
imported_segwit: 'SegWit transferido',
|
imported_segwit: 'Carteira SegWit importada',
|
||||||
imported_legacy: 'Legacy transferido',
|
imported_legacy: 'Carteira antiga importada',
|
||||||
imported_watchonly: 'Watch-only importada',
|
imported_watchonly: 'Carteira somente-leitura importada',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
transactions: {
|
transactions: {
|
||||||
list: {
|
list: {
|
||||||
tabBarLabel: 'Transações',
|
tabBarLabel: 'Transações',
|
||||||
title: 'Transações',
|
title: 'Transações',
|
||||||
description: 'Uma lista de transações feitas ou recebidas nas suas wallets',
|
description: 'Uma lista de transações feitas ou recebidas nas suas carteiras',
|
||||||
conf: 'conf',
|
conf: 'conf',
|
||||||
},
|
},
|
||||||
details: {
|
details: {
|
||||||
title: 'transação',
|
title: 'Transação',
|
||||||
from: 'De',
|
from: 'De',
|
||||||
to: 'Para',
|
to: 'Para',
|
||||||
copy: 'Copiar',
|
copy: 'Copiar',
|
||||||
transaction_details: 'Transaction details',
|
transaction_details: 'Detalhes',
|
||||||
show_in_block_explorer: 'Show in block explorer',
|
show_in_block_explorer: 'Mostrar num navegador',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
send: {
|
send: {
|
||||||
header: 'Enviar',
|
header: 'Enviar',
|
||||||
confirm: {
|
confirm: {
|
||||||
header: 'Confirm',
|
header: 'Confirmar',
|
||||||
sendNow: 'Send now',
|
sendNow: 'Enviar agora',
|
||||||
},
|
},
|
||||||
success: {
|
success: {
|
||||||
done: 'Done',
|
done: 'Enviado',
|
||||||
},
|
},
|
||||||
details: {
|
details: {
|
||||||
title: 'Criar Transacção',
|
title: 'Criar Transacção',
|
||||||
|
@ -134,53 +134,53 @@ module.exports = {
|
||||||
cancel: 'Cancelar',
|
cancel: 'Cancelar',
|
||||||
scan: 'Scanear',
|
scan: 'Scanear',
|
||||||
create: 'Criar',
|
create: 'Criar',
|
||||||
address: 'Address',
|
address: 'Endereço',
|
||||||
total_exceeds_balance: 'The total amount exceeds balance',
|
total_exceeds_balance: 'Valor total excede o saldo disponível',
|
||||||
send: 'Send',
|
send: 'Send',
|
||||||
remaining_balance: 'Saldo restante',
|
remaining_balance: 'Saldo restante',
|
||||||
},
|
},
|
||||||
create: {
|
create: {
|
||||||
title: 'Criar Transacção',
|
title: 'Criar Transacção',
|
||||||
details: 'Details',
|
details: 'Detalhes',
|
||||||
error: 'Erro ao criar transação. Endereço inválido ou quantia?',
|
error: 'Erro ao criar transação. Endereço ou valor inválidos?',
|
||||||
go_back: 'Voltar',
|
go_back: 'Voltar',
|
||||||
this_is_hex: 'Este é o hex da transação, assinado e pronto para ser difundido para a network. Continuar?',
|
this_is_hex: 'Este é o hex da transação, assinado e pronto para ser divulgado para o mundo. Continuar?',
|
||||||
to: 'Para',
|
to: 'Para',
|
||||||
amount: 'Quantia',
|
amount: 'Valor',
|
||||||
fee: 'Taxa',
|
fee: 'Taxa',
|
||||||
tx_size: 'Tamanho TX',
|
tx_size: 'Tamanho',
|
||||||
satoshi_per_byte: 'satoshiPerByte',
|
satoshi_per_byte: 'satoshis por byte',
|
||||||
memo: 'Nota pessoal',
|
memo: 'Nota',
|
||||||
broadcast: 'Difundir',
|
broadcast: 'Divulgar',
|
||||||
not_enough_fee: 'Taxa demasiado baixa. Aumente a taxa',
|
not_enough_fee: 'Taxa muito baixa. Aumente a taxa',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
receive: {
|
receive: {
|
||||||
header: 'receber',
|
header: 'Receber',
|
||||||
details: {
|
details: {
|
||||||
title: 'Partilhar este endereço com o pagador',
|
title: 'Envie este endereço para o pagador',
|
||||||
share: 'partilhar',
|
share: 'Compartilhar',
|
||||||
copiedToClipboard: 'copiado para clip board',
|
copiedToClipboard: 'Copiado para a área de trabalho',
|
||||||
label: 'Description',
|
label: 'Descrição',
|
||||||
setAmount: 'Receive with amount',
|
setAmount: 'Valor a receber',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Buy Bitcoin',
|
header: 'Comprar Bitcoin',
|
||||||
tap_your_address: 'Tap your address to copy it to clipboard:',
|
tap_your_address: 'Toque seu endereço para copiá-lo para a área de transferência:',
|
||||||
copied: 'Copied to Clipboard!',
|
copied: 'Copiado!',
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
tabBarLabel: 'Definições',
|
tabBarLabel: 'preferências',
|
||||||
header: 'definições',
|
header: 'definições',
|
||||||
plausible_deniability: 'Negação plausível...',
|
plausible_deniability: 'Negação plausível...',
|
||||||
storage_not_encrypted: 'Armazenamento: não encriptado',
|
storage_not_encrypted: 'Arquivos: não criptografados',
|
||||||
storage_encrypted: 'Armazenamento: encriptado',
|
storage_encrypted: 'Arquivos: criptografados',
|
||||||
password: 'Password',
|
password: 'Senha',
|
||||||
password_explain: 'Definir a password para desencriptar o armazenamento',
|
password_explain: 'Definir a senha para descriptografar os arquivos',
|
||||||
retype_password: 'Inserir password novamente',
|
retype_password: 'Inserir senha novamente',
|
||||||
passwords_do_not_match: 'Passwords não coincidem',
|
passwords_do_not_match: 'Senhas não coincidem',
|
||||||
encrypt_storage: 'Encriptar',
|
encrypt_storage: 'Criptografar',
|
||||||
about: 'Sobre',
|
about: 'Sobre',
|
||||||
language: 'Idioma',
|
language: 'Idioma',
|
||||||
currency: 'Moeda',
|
currency: 'Moeda',
|
||||||
|
@ -188,30 +188,30 @@ module.exports = {
|
||||||
plausibledeniability: {
|
plausibledeniability: {
|
||||||
title: 'Negação plausível',
|
title: 'Negação plausível',
|
||||||
help:
|
help:
|
||||||
'Em algumas circunstâncias, pode ser forçado a relevar uma ' +
|
'Em algumas circunstâncias, você pode ser forçado a revelar uma ' +
|
||||||
'password. Para manter as suas moedas seguras, A BlueWallet pode criar outro ' +
|
'senha. Para manter seus bitcoins seguros, A BlueWallet pode criar ' +
|
||||||
'armazenamento encriptado, com uma password diferente. Sobre pressão, ' +
|
'uma senha alternativa. Sob pressão, você pode revelar essa senha ao ' +
|
||||||
'pode revelar esta password a um terceiro. Se inserida na ' +
|
'invés da senha principal. Quando inserida na BlueWallet, esta abrirá ' +
|
||||||
'BlueWallet, esta vai abrir um armazenamento "falso". Que vai parecer ' +
|
'uma interface falsa, que parecerá legítima a um terceiro, enquanto ' +
|
||||||
'legítimo a um terceiro, mas que secretamente vai manter o seu armazenamento principal ' +
|
'suas carteiras originais continuarão à salvo em segredo.',
|
||||||
'com as moedas em segurança.',
|
help2: 'Essa nova interface é completamente funcional e você pode inclusive ' +
|
||||||
help2: 'Este novo armazenamento é completamente funcional, e pode guardar ' + 'um valor minímo para parecer mais real.',
|
'manter nele um valor minímo para que pareça mais real.',
|
||||||
create_fake_storage: 'Criar armazenamento encriptado FALSO',
|
create_fake_storage: 'Criar armazenamento criptografada falsa',
|
||||||
go_back: 'Voltar',
|
go_back: 'Voltar',
|
||||||
create_password: 'Criar password',
|
create_password: 'Criar senha',
|
||||||
create_password_explanation: 'Password para armazenamento FALSO não deve coincidir com o principal',
|
create_password_explanation: 'A senha para a interface falsa não deve coincidir com a principal',
|
||||||
password_should_not_match: 'Password para armazenamento FALSO não deve coincidir com o principal',
|
password_should_not_match: 'A senha para a interface falsa não deve coincidir com a principal',
|
||||||
retype_password: 'Inserir password novamente',
|
retype_password: 'Inserir senha novamente',
|
||||||
passwords_do_not_match: 'Passwords não coincidem, tente novamente',
|
passwords_do_not_match: 'Senhas não coincidem, tente novamente',
|
||||||
success: 'Sucesso',
|
success: 'Sucesso',
|
||||||
},
|
},
|
||||||
lnd: {
|
lnd: {
|
||||||
title: 'gerenciar fundos',
|
title: 'manejar fundos',
|
||||||
choose_source_wallet: 'Escolha a sua wallet',
|
choose_source_wallet: 'Escolha a carteira de origem',
|
||||||
refill_lnd_balance: 'Carregar o saldo da Lightning wallet',
|
refill_lnd_balance: 'Recarregar a carteira Lightning',
|
||||||
refill: 'Carregar',
|
refill: 'Recarregar',
|
||||||
withdraw: 'Transferir',
|
withdraw: 'Sacar',
|
||||||
expired: 'Expired',
|
expired: 'Vencido',
|
||||||
sameWalletAsInvoiceError: 'You can not pay an invoice with the same wallet used to create it.',
|
sameWalletAsInvoiceError: 'Você não pode pagar uma fatura com a mesma carteira que a criou.',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import prompt from 'react-native-prompt-android';
|
import prompt from 'react-native-prompt-android';
|
||||||
|
|
||||||
module.exports = (title, text, isCancelable = true) => {
|
module.exports = (title, text, isCancelable = true, type = 'secure-text') => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const buttons = isCancelable
|
const buttons = isCancelable
|
||||||
? [
|
? [
|
||||||
|
@ -30,7 +30,7 @@ module.exports = (title, text, isCancelable = true) => {
|
||||||
];
|
];
|
||||||
|
|
||||||
prompt(title, text, buttons, {
|
prompt(title, text, buttons, {
|
||||||
type: 'secure-text',
|
type: type,
|
||||||
cancelable: isCancelable,
|
cancelable: isCancelable,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* global alert */
|
/* global alert */
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { TouchableOpacity, View } from 'react-native';
|
import { TouchableOpacity, Linking, View } from 'react-native';
|
||||||
import { BlueSpacingVariable, BlueNavigationStyle, SafeBlueArea, BlueCard } from '../../BlueComponents';
|
import { BlueSpacingVariable, BlueNavigationStyle, SafeBlueArea, BlueCard } from '../../BlueComponents';
|
||||||
import { ListItem } from 'react-native-elements';
|
import { ListItem } from 'react-native-elements';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
@ -68,7 +68,7 @@ export default class ManageFunds extends Component {
|
||||||
titleStyle={{ color: BlueApp.settings.foregroundColor }}
|
titleStyle={{ color: BlueApp.settings.foregroundColor }}
|
||||||
component={TouchableOpacity}
|
component={TouchableOpacity}
|
||||||
onPress={a => {
|
onPress={a => {
|
||||||
alert('Coming soon');
|
Linking.openURL('https://zigzag.io');
|
||||||
}}
|
}}
|
||||||
title={loc.lnd.withdraw}
|
title={loc.lnd.withdraw}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -10,6 +10,7 @@ let BlueApp = require('../../BlueApp');
|
||||||
let currency = require('../../currency');
|
let currency = require('../../currency');
|
||||||
let EV = require('../../events');
|
let EV = require('../../events');
|
||||||
let loc = require('../../loc');
|
let loc = require('../../loc');
|
||||||
|
let prompt = require('../../prompt');
|
||||||
const { width } = Dimensions.get('window');
|
const { width } = Dimensions.get('window');
|
||||||
|
|
||||||
export default class ScanLndInvoice extends React.Component {
|
export default class ScanLndInvoice extends React.Component {
|
||||||
|
@ -92,6 +93,14 @@ export default class ScanLndInvoice extends React.Component {
|
||||||
let decoded;
|
let decoded;
|
||||||
try {
|
try {
|
||||||
decoded = await w.decodeInvoice(data);
|
decoded = await w.decodeInvoice(data);
|
||||||
|
let freeAmount = 0;
|
||||||
|
while (+decoded.num_satoshis === 0) {
|
||||||
|
freeAmount = await prompt('This is free amount invoice', 'How many satoshis do you want to tip?', false, 'numeric');
|
||||||
|
freeAmount = parseInt(freeAmount);
|
||||||
|
if (!isNaN(freeAmount) && freeAmount > 0) {
|
||||||
|
decoded.num_satoshis = freeAmount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let expiresIn = (decoded.timestamp * 1 + decoded.expiry * 1) * 1000; // ms
|
let expiresIn = (decoded.timestamp * 1 + decoded.expiry * 1) * 1000; // ms
|
||||||
if (+new Date() > expiresIn) {
|
if (+new Date() > expiresIn) {
|
||||||
|
@ -105,6 +114,7 @@ export default class ScanLndInvoice extends React.Component {
|
||||||
invoice: data,
|
invoice: data,
|
||||||
decoded,
|
decoded,
|
||||||
expiresIn,
|
expiresIn,
|
||||||
|
freeAmount,
|
||||||
destination: data,
|
destination: data,
|
||||||
});
|
});
|
||||||
} catch (Err) {
|
} catch (Err) {
|
||||||
|
@ -143,7 +153,7 @@ export default class ScanLndInvoice extends React.Component {
|
||||||
let start = +new Date();
|
let start = +new Date();
|
||||||
let end;
|
let end;
|
||||||
try {
|
try {
|
||||||
await fromWallet.payInvoice(this.state.invoice);
|
await fromWallet.payInvoice(this.state.invoice, this.state.freeAmount);
|
||||||
end = +new Date();
|
end = +new Date();
|
||||||
} catch (Err) {
|
} catch (Err) {
|
||||||
console.log(Err.message);
|
console.log(Err.message);
|
||||||
|
@ -170,7 +180,24 @@ export default class ScanLndInvoice extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
|
<TouchableWithoutFeedback
|
||||||
|
onPress={async () => {
|
||||||
|
if (this.state.freeAmount) {
|
||||||
|
// must ask user again about the amount
|
||||||
|
let freeAmount = await prompt('This is free amount invoice', 'How many satoshis do you want to tip?', false, 'numeric');
|
||||||
|
freeAmount = parseInt(freeAmount);
|
||||||
|
if (!isNaN(freeAmount) && freeAmount > 0) {
|
||||||
|
let decoded = this.state.decoded;
|
||||||
|
decoded.num_satoshis = freeAmount;
|
||||||
|
this.setState({ decoded, freeAmount });
|
||||||
|
Keyboard.dismiss();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Keyboard.dismiss();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
accessible={false}
|
||||||
|
>
|
||||||
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
|
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
|
||||||
<Text style={{ textAlign: 'center', fontSize: 50, fontWeight: '700', color: '#2f5fb3' }}>
|
<Text style={{ textAlign: 'center', fontSize: 50, fontWeight: '700', color: '#2f5fb3' }}>
|
||||||
{this.state.hasOwnProperty('decoded') &&
|
{this.state.hasOwnProperty('decoded') &&
|
||||||
|
|
|
@ -26,6 +26,7 @@ export default class Language extends Component {
|
||||||
{ label: 'Deutsch (DE)', value: 'de_de' },
|
{ label: 'Deutsch (DE)', value: 'de_de' },
|
||||||
{ label: 'Česky (CZ)', value: 'cs_cz' },
|
{ label: 'Česky (CZ)', value: 'cs_cz' },
|
||||||
{ label: 'Thai (TH)', value: 'th_th' },
|
{ label: 'Thai (TH)', value: 'th_th' },
|
||||||
|
{ label: 'Dutch (NL)', value: 'nl_nl' },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,9 +90,7 @@ export default class BuyBitcoin extends Component {
|
||||||
color: BlueApp.settings.buttonTextColor,
|
color: BlueApp.settings.buttonTextColor,
|
||||||
}}
|
}}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
Linking.openURL(
|
Linking.openURL('https://old.changelly.com/?ref_id=rtagfcvnwiwvhm99');
|
||||||
'https://payments.changelly.com/?crypto=USD&fiat=USD&ref_id=rtagfcvnwiwvhm99&address=' + this.state.address,
|
|
||||||
);
|
|
||||||
}}
|
}}
|
||||||
title="Buy from Changelly"
|
title="Buy from Changelly"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Add table
Reference in a new issue