Merge branch 'master' into limpbrains-cc

This commit is contained in:
marcosrdz 2020-11-17 16:11:32 -05:00
commit 501bf5cfe4
21 changed files with 316 additions and 296 deletions

8
App.js
View File

@ -33,7 +33,8 @@ import DeviceQuickActions from './class/quick-actions';
import Notifications from './blue_modules/notifications';
import WalletImport from './class/wallet-import';
import Biometric from './class/biometrics';
import WidgetCommunication from './blue_modules/WidgetCommunication.ios';
import WidgetCommunication from './blue_modules/WidgetCommunication';
import changeNavigationBarColor from 'react-native-navigation-bar-color';
const A = require('./blue_modules/analytics');
if (process.env.NODE_ENV !== 'development') {
Sentry.init({
@ -75,6 +76,11 @@ const App = () => {
useEffect(() => {
if (colorScheme) {
BlueCurrentTheme.updateColorScheme();
if (colorScheme === 'light') {
changeNavigationBarColor(BlueDefaultTheme.colors.background, true, true);
} else {
changeNavigationBarColor(BlueDarkTheme.colors.buttonBackgroundColor, false, true);
}
}
}, [colorScheme]);

View File

@ -2288,19 +2288,19 @@ export class BlueBitcoinAmount extends Component {
secondaryDisplayCurrency = formatBalanceWithoutSuffix(sat, BitcoinUnit.LOCAL_CURRENCY, false);
break;
case BitcoinUnit.SATS:
secondaryDisplayCurrency = formatBalanceWithoutSuffix(amount.toString(), BitcoinUnit.LOCAL_CURRENCY, false);
secondaryDisplayCurrency = formatBalanceWithoutSuffix((isNaN(amount) ? 0 : amount).toString(), BitcoinUnit.LOCAL_CURRENCY, false);
break;
case BitcoinUnit.LOCAL_CURRENCY:
secondaryDisplayCurrency = currency.fiatToBTC(parseFloat(amount));
if (BlueBitcoinAmount.conversionCache[amount + BitcoinUnit.LOCAL_CURRENCY]) {
// cache hit! we reuse old value that supposedly doesnt have rounding errors
const sats = BlueBitcoinAmount.conversionCache[amount + BitcoinUnit.LOCAL_CURRENCY];
secondaryDisplayCurrency = currency.fiatToBTC(parseFloat(isNaN(amount) ? 0 : amount));
if (BlueBitcoinAmount.conversionCache[isNaN(amount) ? 0 : amount + BitcoinUnit.LOCAL_CURRENCY]) {
// cache hit! we reuse old value that supposedly doesn't have rounding errors
const sats = BlueBitcoinAmount.conversionCache[isNaN(amount) ? 0 : amount + BitcoinUnit.LOCAL_CURRENCY];
secondaryDisplayCurrency = currency.satoshiToBTC(sats);
}
break;
}
if (amount === BitcoinUnit.MAX) secondaryDisplayCurrency = ''; // we dont want to display NaN
if (amount === BitcoinUnit.MAX) secondaryDisplayCurrency = ''; // we don't want to display NaN
return (
<TouchableWithoutFeedback disabled={this.props.pointerEvents === 'none'} onPress={() => this.textInput.focus()}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
@ -2340,16 +2340,12 @@ export class BlueBitcoinAmount extends Component {
} else {
text = `${parseInt(split[0], 10)}`;
}
text = this.state.unit === BitcoinUnit.BTC ? text.replace(/[^0-9.]/g, '') : text.replace(/[^0-9]/g, '');
text = text.replace(/(\..*)\./g, '$1');
if (text.startsWith('.')) {
text = '0.';
}
text = text.replace(/(0{1,}.)\./g, '$1');
if (this.state.unit !== BitcoinUnit.BTC) {
text = text.replace(/[^0-9.]/g, '');
}
} else if (this.state.unit === BitcoinUnit.LOCAL_CURRENCY) {
text = text.replace(/,/gi, '');
if (text.split('.').length > 2) {
@ -2365,9 +2361,9 @@ export class BlueBitcoinAmount extends Component {
}
text = rez;
}
text = text.replace(/[^\d.,-]/g, ''); // remove all but numberd, dots & commas
text = text.replace(/[^\d.,-]/g, ''); // remove all but numbers, dots & commas
text = text.replace(/(\..*)\./g, '$1');
}
this.props.onChangeText(text);
}}
onBlur={() => {
@ -2380,7 +2376,7 @@ export class BlueBitcoinAmount extends Component {
maxLength={this.maxLength()}
ref={textInput => (this.textInput = textInput)}
editable={!this.props.isLoading && !this.props.disabled}
value={parseFloat(amount) > 0 || amount === BitcoinUnit.MAX ? amount : undefined}
value={parseFloat(amount) >= 0 || amount === BitcoinUnit.MAX ? amount : undefined}
placeholderTextColor={
this.props.disabled ? BlueCurrentTheme.colors.buttonDisabledTextColor : BlueCurrentTheme.colors.alternativeTextColor2
}

View File

@ -68,7 +68,7 @@ export class AbstractHDElectrumWallet extends AbstractHDWallet {
}
async generate() {
const buf = await randomBytes(32);
const buf = await randomBytes(16);
this.secret = bip39.entropyToMnemonic(buf.toString('hex'));
}

40
components/BottomModal.js Normal file
View File

@ -0,0 +1,40 @@
import React from 'react';
import PropTypes from 'prop-types';
import { StyleSheet, useWindowDimensions } from 'react-native';
import Modal from 'react-native-modal';
const styles = StyleSheet.create({
root: {
justifyContent: 'flex-end',
margin: 0,
},
});
const BottomModal = ({ onBackButtonPress, onBackdropPress, onClose, windowHeight, windowWidth, ...props }) => {
const valueWindowHeight = useWindowDimensions().height;
const valueWindowWidth = useWindowDimensions().width;
const handleBackButtonPress = onBackButtonPress ?? onClose;
const handleBackdropPress = onBackdropPress ?? onClose;
return (
<Modal
style={styles.root}
deviceHeight={windowHeight ?? valueWindowHeight}
deviceWidth={windowWidth ?? valueWindowWidth}
onBackButtonPress={handleBackButtonPress}
onBackdropPress={handleBackdropPress}
{...props}
/>
);
};
BottomModal.propTypes = {
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element), PropTypes.element]),
onBackButtonPress: PropTypes.func,
onBackdropPress: PropTypes.func,
onClose: PropTypes.func,
windowHeight: PropTypes.number,
windowWidth: PropTypes.number,
};
export default BottomModal;

View File

@ -35,8 +35,17 @@ struct WalletData {
var balance: Double
var latestTransactionTime: Int = 0
var formattedBalanceBTC: String {
let formatter = NumberFormatter()
formatter.numberStyle = .none
formatter.usesSignificantDigits = true
formatter.maximumSignificantDigits = 9
formatter.roundingMode = .up
let value = NSNumber(value: balance / 100000000);
return "\(value.decimalValue) BTC"
if let valueString = formatter.string(from: value) {
return "\(String(describing: valueString)) BTC"
} else {
return "0 BTC"
}
}
}

View File

@ -12,6 +12,9 @@
"dont_allow": "Ablehnen",
"yes": "Ja",
"no": "Nein",
"save": "Speichern",
"seed": "Seed",
"wallet_key": "Wallet Schlüssel",
"invalid_animated_qr_code_fragment" : "Ungültig animiertes QR-Code-Fragment. Bitte erneut versuchen",
"file_saved": "Die Datei ({filePath}) wurde deinen Downloadfolder gespeichert."
},
@ -287,6 +290,11 @@
"save": "Speichern",
"saved": "Gespeichert"
},
"notifications": {
"would_you_like_to_receive_notifications": "Möchten Sie bei Zahlungseingängen eine Benachrichtigung erhalten?",
"no_and_dont_ask": "Nein und nicht erneut fragen",
"ask_me_later": "Später erneut fragen"
},
"transactions": {
"cancel_explain": "Wir werden diese Transaktion mit derjenigen ersetzen, welche an dich überweist und höhere Transaktionskosten hat. Die Transaktion wird dadurch effektiv abgebrochen. Dies wird RBF genannt - Replace By Fee.",
"cancel_no": "Diese Transaktion ist nicht ersetzbar.",
@ -307,8 +315,9 @@
"details_title": "Transaktion",
"details_to": "Ausgehend",
"details_transaction_details": "Transaktionsdetails",
"enable_hw": "Dieses Wallet nutzt keine Hardware-Wallet. Möchtest Du die Verwendung einer Hardware-Wallet aktivieren?",
"enable_hw": "Diese Wallet wird ohne Hardware wallet verwendet. Möchtest Du eine Hardware-Wallet aktivieren?",
"list_conf": "Bestätigungen: {number}",
"pending": "Ausstehend",
"list_title": "Transaktionen",
"rbf_explain": "BlueWallet ersetzt diese Transaktion zur Verringerung der Transaktionszeit durch eine mit höherer Gebühr. (RBF - Replace By Fee)",
"rbf_title": "TRX-Gebühr erhöhen (RBF)",
@ -317,7 +326,7 @@
"transactions_count": "Anzahl Transaktionen"
},
"wallets": {
"add_bitcoin_explain": "Simple and powerful Bitcoin wallet",
"add_bitcoin_explain": "Einfache und leistungsstarke Bitcoin Wallet",
"add_bitcoin": "Bitcoin",
"add_create": "Erstellen",
"add_entropy_generated": "{gen} Bytes an generierter Entropie ",
@ -326,7 +335,7 @@
"add_import_wallet": "Wallet importieren",
"import_file": "Datei importieren",
"add_lightning": "Lightning",
"add_lightning_explain": "For spending with instant transactions",
"add_lightning_explain": "Für Ausgaben mit sofortigen Transaktionen",
"add_lndhub": "LNDHub Verbindung",
"add_lndhub_error": "Die angegebene LNDHub Verbindung ist ungültig. ",
"add_lndhub_placeholder": "Adresse Deines Bitcoin-Knotens (Node)",
@ -391,10 +400,11 @@
"xpub_title": "Wallet XPUB"
},
"multisig": {
"multisig_vault": "Vault",
"multisig_vault_explain": "Best security for large amounts",
"multisig_vault": "Tresor",
"multisig_vault_explain": "Höchste Sicherheit für große Beträge",
"provide_signature": "Stell die Signatur bereit",
"vault_key": "Tresor-Schlüssel: {number}",
"required_keys_out_of_total": "Erforderliche Schlüssel aus dem Total",
"fee": "Gebhür: {number}",
"fee_btc": "{number} BTC",
"confirm": "Bestätigen",
@ -404,6 +414,42 @@
"scan_or_import_file": "Datei scannen oder importieren",
"export_coordination_setup": "Koordinations-Setup exportieren",
"cosign_this_transaction": "Diese Transaktion teilsignieren?",
"co_sign_transaction": "QR-Transaktion teilsignieren"
"lets_start": "Erstellung beginnen",
"create": "Erstellen",
"provide_key": "Schlüssel eingeben",
"native_segwit_title": "Bewährte Praxis",
"wrapped_segwit_title": "Größte Kompatibilität",
"legacy_title": "Altformat",
"co_sign_transaction": "QR-Transaktion teilsignieren",
"what_is_vault": "Ein Tresor ist ein",
"what_is_vault_numberOfWallets": "{m}-von-{n} Multisignatur",
"what_is_vault_wallet": "wallet",
"vault_advanced_customize": "Tresor Einstellungen",
"needs": "Zum Senden werden",
"what_is_vault_description_number_of_vault_keys": "{m} Tresorschlüssel",
"what_is_vault_description_to_spend": "benötigt. Ein 3ter dient \nals Backup",
"quorum": "{m} von {n} sind signaturfähig",
"quorum_header": "Signaturfähigkeit",
"of": "von",
"wallet_type": "Art des Wallets",
"view_key": "view",
"invalid_mnemonics": "Ungültige mnemonische Phrase",
"invalid_cosigner": "Keine gültigen Daten des Mitsignierers",
"invalid_cosigner_format": "Falscher Mitsignierer: Dies ist kein Mitsignierer für das Format {format} ",
"create_new_key": "Neuerstellen",
"scan_or_open_file": "Datei scannen oder öffnen",
"i_have_mnemonics": "Seed des Schlüssels importieren",
"please_write_down_mnemonics": "Bitte schreibe diese mnemonische Phrase auf einen Blatt Papier. Keine Sorge, dies ist auch später noch möglich.",
"i_wrote_it_down": "Ok, ich habe sie notiert.",
"type_your_mnemonics": "Seed zum Import deines Tresorschlüssels eingeben",
"this_is_cosigners_xpub": "Dies ist der xpub für Mitsigierer zum Import in ein anderes Wallet. Er kann sicher mit anderen geteilt werden.",
"wallet_key_created": "Dein Tresorschlüssel wurde erstellt. Nimm dir Zeit ein sicheres Backup des mnemonischen Seeds herzustellen. ",
"are_you_sure_seed_will_be_lost": "Bist Du sicher? Dein mnemonischer Seed ist ohne Backup verloren!",
"forget_this_seed": "Seed aus Speicher löschen",
"invalid_fingerprint": "Der Fingerabdruck dieses Seeds stimmt nicht mit dem Fingerabdruck des Mitsignierers überein",
"view_edit_cosigners": "Mitsignierer anzeigen/bearbeiten",
"this_cosigner_is_already_imported": "Dieser Mitsignierer ist schon vorhanden",
"export_signed_psbt": "Signierte PSBT exportieren",
"view_edit_cosigners_title": "Mitsignierer bearbeiten"
}
}

View File

@ -13,7 +13,7 @@
"yes": "כן",
"no": "לא",
"save": "שמירה",
"seed": "Seed",
"seed": "גרעין",
"wallet_key": "מפתח ארנק",
"invalid_animated_qr_code_fragment" : "קטע קוד QR מונפש לא תקין, אנא נסו שוב",
"file_saved": "הקובץ ({filePath}) נשמר לתיקיית ההורדות שלך."
@ -290,6 +290,11 @@
"save": "שמירה",
"saved": "נשמר"
},
"notifications": {
"would_you_like_to_receive_notifications": "האם ברצונך לקבל התראות כאשר מתקבלים תשלומים נכנסים?",
"no_and_dont_ask": "לא ואל תשאל",
"ask_me_later": "שאל אותי מאוחר יותר"
},
"transactions": {
"cancel_explain": "אנו נחליף את ההעברה הזאת באחת עם עמלה גבוהה יותר. פעולה זאת למעשה מבטלת את העברה. פעולה זאת נקראת RBF - Replace By Fee.",
"cancel_no": "העברה זאת אינה ניתנת להחלפה",
@ -310,8 +315,9 @@
"details_title": "העברה",
"details_to": "פלט",
"details_transaction_details": "פרטי העברה",
"enable_hw": "ארנק זה אינו נמצא בשימוש בצירוף ארנק חומרה. האם תרצו לאפשר שימוש בארנק חומרה?",
"enable_hw": "ארנק זה אינו בשימוש בצירוף ארנק חומרה. האם ברצונך לאפשר שימוש בארנק חומרה?",
"list_conf": "אישורים: {number}",
"pending": "Pending",
"list_title": "תנועות",
"rbf_explain": "אנו נחליף את העברה זו בהעברה עם עמלה גבוהה יותר, כך שמהירות קבלת האישור אמורה לעלות. פעולה זאת נקראת CPFP - Child Pays For Parent.",
"rbf_title": "העלאת עמלה (RBF)",
@ -422,28 +428,28 @@
"needs": "דרישות",
"what_is_vault_description_number_of_vault_keys": "{m} מפתחות כספת",
"what_is_vault_description_to_spend": "to spend and a 3rd one you \ncan use as backup.",
"quorum": "{m} of {n} quorum",
"quorum_header": "Quorum",
"of": "of",
"wallet_type": "Wallet type",
"view_key": "view",
"invalid_mnemonics": "This mnemonic phrase doesnt seem to be valid",
"invalid_cosigner": "Not a valid cosigner data",
"invalid_cosigner_format": "Incorrect cosigner: this is not a cosigner for {format} format",
"create_new_key": "Create New",
"scan_or_open_file": "Scan or open file",
"i_have_mnemonics": "I have a seed for this key...",
"please_write_down_mnemonics": "Please write down this mnemonic phrase on paper. Don't worry, you can write it down later.",
"i_wrote_it_down": "Ok, I wrote it down",
"type_your_mnemonics": "Insert a seed to import your existing vault key",
"this_is_cosigners_xpub": "This is cosigner's xpub, ready to be imported in other wallet. It is safe to share it.",
"wallet_key_created": "Your vault key was created. Take a moment to safely backup your mnemonic seed",
"are_you_sure_seed_will_be_lost": "Are you sure? Your mnemonic seed will be lost if you dont have a backup",
"forget_this_seed": "Forget this seed and use xpub instead",
"invalid_fingerprint": "Fingerprint for this seed doesnt match this cosigners fingerprint",
"view_edit_cosigners": "View/edit cosigners",
"this_cosigner_is_already_imported": "This cosigner is already imported",
"export_signed_psbt": "Export Signed PSBT",
"view_edit_cosigners_title": "Edit Cosigners"
"quorum": "קוורום {m} מתוך {n}",
"quorum_header": "קוורום",
"of": "מתוך",
"wallet_type": "סוג ארנק",
"view_key": "הצגה",
"invalid_mnemonics": "צירוף מנמוני זה לא נראה תקין",
"invalid_cosigner": "נתוני חותם שותף לא תקינים",
"invalid_cosigner_format": "חותם שותף שגוי: זה אינו חותם שותף לפורמט {format}",
"create_new_key": "צרו חדש",
"scan_or_open_file": "סריקה או פתיחת קובץ",
"i_have_mnemonics": "יש לי גרעין למפתח זה...",
"please_write_down_mnemonics": "אנא רשמו על דף צרוף מנמוני זה. אל דאגה, תוכלו לרשום אותו גם אחר כך.",
"i_wrote_it_down": "אוקיי, רשמתי את זה",
"type_your_mnemonics": "הכניסו גרעין כדי לייבא את מפתח הכספת הקיימת שלכם",
"this_is_cosigners_xpub": "This is the cosigner's xpub, ready to be imported into another wallet. It is safe to share it.",
"wallet_key_created": "מפתח הכספת שלכם נוצר. קחו רגע לגבות את הגרעין המנמוני שלכם בבטחה. ",
"are_you_sure_seed_will_be_lost": "האם אתם בטוחים? הגרעין המנמוני שלכם יאבד אם אין ברשותכם גיבוי",
"forget_this_seed": "שכח את גרעין זה והשתמש במפתח צפייה במקום",
"invalid_fingerprint": "מזהה לגרעין זה לא מתאים למזהה של השותף החותם",
"view_edit_cosigners": "הצגת/עריכת שותפים חותמים",
"this_cosigner_is_already_imported": "שותף חותם זה כבר יובא",
"export_signed_psbt": "יצוא PSBT חתום",
"view_edit_cosigners_title": "עריכת שותפים חותמים"
}
}

View File

@ -12,6 +12,9 @@
"dont_allow": "許可しない",
"yes": "はい",
"no": "いいえ",
"save": "保存",
"seed": "シード",
"wallet_key": "ウォレットキー",
"invalid_animated_qr_code_fragment" : "無効なアニメーションQRCodeフラグメントです。再度お試しください。",
"file_saved": "ファイル ({filePath}) はダウンロードフォルダに保存されました。"
},
@ -287,6 +290,11 @@
"save": "保存",
"saved": "保存済"
},
"notifications": {
"would_you_like_to_receive_notifications": "支払いを受けた際に通知を受け取りますか?",
"no_and_dont_ask": "No and dont ask",
"ask_me_later": "あとで"
},
"transactions": {
"cancel_explain": "このトランザクションを、最初の支払い時より高い手数料を持つものに置き換えます。これは事実上、最初のトランザクションをキャンセルします。これはReplace By Fee - RBFと呼ばれています。",
"cancel_no": "このトランザクションは交換可能ではありません",
@ -295,6 +303,8 @@
"cpfp_exp": "あなたの未承認トランザクションを消費する別のトランザクションを作成します。元のトランザクションの手数料よりも合計金額が高くなるため、より早くマイニングされます。これはCPFP - Child Pays For Parentと呼ばれています。",
"cpfp_no_bump": "このトランザクションはバンプ可能ではありません",
"cpfp_title": "バンプ費用 (CPFP)",
"details_balance_hide": "残高を隠す",
"details_balance_show": "残高を表示",
"details_block": "ブロック高",
"details_copy": "コピー",
"details_from": "送り主",
@ -305,8 +315,9 @@
"details_title": "取引",
"details_to": "送り先",
"details_transaction_details": "取引詳細",
"enable_hw": "このウォレットはハードウォレットとの併用はされていません。ハードウェアウォレットの使用を有効にしますか?",
"enable_hw": "This wallet is not being used in conjunction with a hardware wallet. Would you like to enable hardware wallet use?",
"list_conf": "コンファメーション: {number}",
"pending": "保留中",
"list_title": "取引",
"rbf_explain": "このトランザクションを手数料の高いものに置き換えるので、マイニングが早くなるはずです。これをRBF - Replace By Feeといいます。",
"rbf_title": "手数料をバンプ (RBF)",
@ -315,7 +326,7 @@
"transactions_count": "トランザクションカウント"
},
"wallets": {
"add_bitcoin_explain": "Simple and powerful Bitcoin wallet",
"add_bitcoin_explain": "シンプルかつパワフルなBitcoinウォレット",
"add_bitcoin": "ビットコイン",
"add_create": "作成",
"add_entropy_generated": "生成されたエントロピーの {gen} バイト",
@ -324,7 +335,7 @@
"add_import_wallet": "ウォレットをインポート",
"import_file": "インポートファイル",
"add_lightning": "ライトニング",
"add_lightning_explain": "For spending with instant transactions",
"add_lightning_explain": "復号のためパスワードを入力",
"add_lndhub": "あなたのLNDHubに接続",
"add_lndhub_error": "指定されたードアドレスは有効なLNDHubードではありません。",
"add_lndhub_placeholder": "あなたのノードアドレス",
@ -360,11 +371,12 @@
"import_imported": "インポート完了",
"import_scan_qr": "QR コードの読み取り",
"import_success": "成功",
"looks_like_bip38": "パスワード保護された秘密鍵(BIP38)のようです。",
"enter_bip38_password": "復号化のためパスワードを入力",
"import_title": "インポート",
"list_create_a_button": "今すぐ追加",
"list_create_a_wallet": "ウォレットを追加",
"list_create_a_wallet1": "ウォレット作成は無料で",
"list_create_a_wallet2": "好きなだけ複数作成できます",
"list_create_a_wallet_text": "無料で好きなだけ作成できます",
"list_empty_txs1": "ここに取引が表示されます",
"list_empty_txs1_lightning": "Lightning ウォレットを日常の取引にご利用ください。手数料は安く、送金はあっという間に完了します。",
"list_empty_txs2": "現在は何もありません",
@ -388,10 +400,11 @@
"xpub_title": "ウォレット XPUB"
},
"multisig": {
"multisig_vault": "Vault",
"multisig_vault": "金庫",
"multisig_vault_explain": "Best security for large amounts",
"provide_signature": "署名を提供",
"vault_key": "ヴォールトキー {number}",
"required_keys_out_of_total": "Required keys out of the total",
"fee": "費用: {number}",
"fee_btc": "{number} BTC",
"confirm": "承認",
@ -401,6 +414,42 @@
"scan_or_import_file": "スキャンまたはファイルインポート",
"export_coordination_setup": "エクスポート調整設定",
"cosign_this_transaction": "このトランザクションに共同署名しますか?",
"co_sign_transaction": "共同署名QRエアギャップトランザクション"
"lets_start": "さあ、始めましょう",
"create": "作成",
"provide_key": "プロバイドキー",
"native_segwit_title": "ベストプラクティス",
"wrapped_segwit_title": "Best compatibility",
"legacy_title": "レガシー",
"co_sign_transaction": "共同署名QRエアギャップトランザクション",
"what_is_vault": "A Vault is a",
"what_is_vault_numberOfWallets": " {m}-of-{n} multisig ",
"what_is_vault_wallet": "wallet",
"vault_advanced_customize": "Vault Settings...",
"needs": "Needs",
"what_is_vault_description_number_of_vault_keys": " {m} vault keys ",
"what_is_vault_description_to_spend": "to spend and a 3rd one you \ncan use as backup.",
"quorum": "{m} of {n} quorum",
"quorum_header": "Quorum",
"of": "of",
"wallet_type": "Wallet type",
"view_key": "view",
"invalid_mnemonics": "This mnemonic phrase doesnt seem to be valid",
"invalid_cosigner": "Not a valid cosigner data",
"invalid_cosigner_format": "Incorrect cosigner: this is not a cosigner for {format} format",
"create_new_key": "新規作成",
"scan_or_open_file": "スキャンまたはファイルを開く",
"i_have_mnemonics": "この鍵のシードを持っています...",
"please_write_down_mnemonics": "このニーモニック・フレーズを紙に書き取ってください。大丈夫、あとで行うこともできます。",
"i_wrote_it_down": "はい、書き取りました",
"type_your_mnemonics": "Insert a seed to import your existing vault key",
"this_is_cosigners_xpub": "This is the cosigner's xpub, ready to be imported into another wallet. It is safe to share it.",
"wallet_key_created": "Your vault key was created. Take a moment to safely backup your mnemonic seed",
"are_you_sure_seed_will_be_lost": "Are you sure? Your mnemonic seed will be lost if you dont have a backup",
"forget_this_seed": "このシードではなくxpubを代わりに利用する",
"invalid_fingerprint": "Fingerprint for this seed doesnt match this cosigners fingerprint",
"view_edit_cosigners": "View/edit cosigners",
"this_cosigner_is_already_imported": "共同署名者がすでにインポートされています",
"export_signed_psbt": "Export Signed PSBT",
"view_edit_cosigners_title": "Edit Cosigners"
}
}

10
package-lock.json generated
View File

@ -10361,9 +10361,9 @@
"dev": true
},
"eslint-plugin-standard": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz",
"integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ=="
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz",
"integrity": "sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA=="
},
"eslint-rule-composer": {
"version": "0.3.0",
@ -19010,6 +19010,10 @@
"react-native-animatable": "1.3.3"
}
},
"react-native-navigation-bar-color": {
"version": "git+https://github.com/BlueWallet/react-native-navigation-bar-color.git#34e44b8f44e442133de9d35c35f2679d40982804",
"from": "git+https://github.com/BlueWallet/react-native-navigation-bar-color.git#34e44b8f44e442133de9d35c35f2679d40982804"
},
"react-native-obscure": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/react-native-obscure/-/react-native-obscure-1.2.1.tgz",

View File

@ -102,7 +102,7 @@
"eslint-config-standard": "14.1.1",
"eslint-config-standard-react": "9.2.0",
"eslint-plugin-prettier": "3.1.4",
"eslint-plugin-standard": "4.0.1",
"eslint-plugin-standard": "4.0.2",
"events": "1.1.1",
"frisbee": "3.1.4",
"lodash": "4.17.20",
@ -135,6 +135,7 @@
"react-native-linear-gradient": "2.5.6",
"react-native-localize": "1.4.2",
"react-native-modal": "11.5.6",
"react-native-navigation-bar-color": "git+https://github.com/BlueWallet/react-native-navigation-bar-color.git#34e44b8f44e442133de9d35c35f2679d40982804",
"react-native-obscure": "1.2.1",
"react-native-passcode-auth": "git+https://github.com/BlueWallet/react-native-passcode-auth.git#a2ff977ba92b36f8d0a5567f59c05cc608e8bd12",
"react-native-popup-menu-android": "1.0.3",

View File

@ -1,18 +1,20 @@
import React, { useCallback, useContext, useState } from 'react';
import {
View,
InteractionManager,
StatusBar,
Platform,
TextInput,
KeyboardAvoidingView,
Keyboard,
StyleSheet,
useWindowDimensions,
KeyboardAvoidingView,
Platform,
ScrollView,
StatusBar,
StyleSheet,
TextInput,
View,
} from 'react-native';
import QRCode from 'react-native-qrcode-svg';
import { useNavigation, useRoute, useTheme, useFocusEffect } from '@react-navigation/native';
import Share from 'react-native-share';
import Handoff from 'react-native-handoff';
import {
BlueLoadingHook,
BlueCopyTextToClipboard,
@ -26,13 +28,11 @@ import {
BlueAlertWalletExportReminder,
BlueNavigationStyle,
} from '../../BlueComponents';
import BottomModal from '../../components/BottomModal';
import Privacy from '../../Privacy';
import Share from 'react-native-share';
import { Chain, BitcoinUnit } from '../../models/bitcoinUnits';
import Modal from 'react-native-modal';
import HandoffSettings from '../../class/handoff';
import DeeplinkSchemaMatch from '../../class/deeplink-schema-match';
import Handoff from 'react-native-handoff';
import loc from '../../loc';
import { BlueStorageContext } from '../../blue_modules/storage-context';
import Notifications from '../../blue_modules/notifications';
@ -53,7 +53,6 @@ const ReceiveDetails = () => {
const [showAddress, setShowAddress] = useState(false);
const { navigate, goBack } = useNavigation();
const { colors } = useTheme();
const windowHeight = useWindowDimensions().height;
const styles = StyleSheet.create({
modalContent: {
backgroundColor: colors.modal,
@ -67,10 +66,6 @@ const ReceiveDetails = () => {
minHeight: 350,
height: 350,
},
bottomModal: {
justifyContent: 'flex-end',
margin: 0,
},
customAmount: {
flexDirection: 'row',
borderColor: colors.formBorder,
@ -287,13 +282,7 @@ const ReceiveDetails = () => {
const renderCustomAmountModal = () => {
return (
<Modal
deviceHeight={windowHeight}
isVisible={isCustomModalVisible}
style={styles.bottomModal}
onBackdropPress={dismissCustomAmountModal}
onBackButtonPress={dismissCustomAmountModal}
>
<BottomModal isVisible={isCustomModalVisible} onClose={dismissCustomAmountModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<BlueBitcoinAmount
@ -320,7 +309,7 @@ const ReceiveDetails = () => {
<BlueSpacing20 />
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};

View File

@ -31,7 +31,6 @@ import {
BlueListItem,
BlueText,
} from '../../BlueComponents';
import Modal from 'react-native-modal';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
import BigNumber from 'bignumber.js';
import RNFS from 'react-native-fs';
@ -46,6 +45,7 @@ import DeeplinkSchemaMatch from '../../class/deeplink-schema-match';
import loc, { formatBalanceWithoutSuffix } from '../../loc';
import { BlueCurrentTheme } from '../../components/themes';
import CoinsSelected from '../../components/CoinsSelected';
import BottomModal from '../../components/BottomModal';
import { AbstractHDElectrumWallet } from '../../class/wallets/abstract-hd-electrum-wallet';
import { BlueStorageContext } from '../../blue_modules/storage-context';
const currency = require('../../blue_modules/currency');
@ -86,10 +86,6 @@ const styles = StyleSheet.create({
borderWidth: BlueCurrentTheme.colors.borderWidth,
minHeight: 130,
},
bottomModal: {
justifyContent: 'flex-end',
margin: 0,
},
feeModalItem: {
paddingHorizontal: 16,
paddingVertical: 8,
@ -768,13 +764,10 @@ export default class SendDetails extends Component {
];
return (
<Modal
deviceHeight={Dimensions.get('window').height}
<BottomModal
deviceWidth={this.state.width + this.state.width / 2}
isVisible={this.state.isFeeSelectionModalVisible}
style={styles.bottomModal}
onBackdropPress={this.hideFeeSelectionModal}
onBackButtonPress={this.hideFeeSelectionModal}
onClose={this.hideFeeSelectionModal}
>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
@ -831,7 +824,7 @@ export default class SendDetails extends Component {
</TouchableOpacity>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -1024,13 +1017,10 @@ export default class SendDetails extends Component {
renderAdvancedTransactionOptionsModal = () => {
const isSendMaxUsed = this.state.addresses.some(element => element.amount === BitcoinUnit.MAX);
return (
<Modal
deviceHeight={Dimensions.get('window').height}
<BottomModal
deviceWidth={this.state.width + this.state.width / 2}
isVisible={this.state.isAdvancedTransactionOptionsVisible}
style={styles.bottomModal}
onBackdropPress={this.hideAdvancedTransactionOptionsModal}
onBackButtonPress={this.hideAdvancedTransactionOptionsModal}
onClose={this.hideAdvancedTransactionOptionsModal}
>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.advancedTransactionOptionsModalContent}>
@ -1104,7 +1094,7 @@ export default class SendDetails extends Component {
/>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};

View File

@ -447,10 +447,6 @@ const styles = StyleSheet.create({
fontSize: 14,
flexWrap: 'wrap',
},
bottomModal: {
justifyContent: 'flex-end',
margin: 0,
},
modalContentShort: {
marginLeft: 20,
marginRight: 20,

View File

@ -1,23 +1,14 @@
import React, { useState, useRef, useEffect, useContext } from 'react';
import {
Keyboard,
KeyboardAvoidingView,
Platform,
StatusBar,
StyleSheet,
Text,
TouchableOpacity,
useWindowDimensions,
View,
} from 'react-native';
import { Keyboard, KeyboardAvoidingView, Platform, StatusBar, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import LottieView from 'lottie-react-native';
import { Icon } from 'react-native-elements';
import { BlueButton, BlueListItem, BlueNavigationStyle, BlueSpacing20 } from '../../BlueComponents';
import { MultisigHDWallet } from '../../class';
import { useNavigation, useTheme } from '@react-navigation/native';
import loc from '../../loc';
import Modal from 'react-native-modal';
import { SafeAreaView } from 'react-native-safe-area-context';
import { BlueButton, BlueListItem, BlueNavigationStyle, BlueSpacing20 } from '../../BlueComponents';
import BottomModal from '../../components/BottomModal';
import { MultisigHDWallet } from '../../class';
import loc from '../../loc';
import { BlueStorageContext } from '../../blue_modules/storage-context';
const WalletsAddMultisig = () => {
@ -31,8 +22,6 @@ const WalletsAddMultisig = () => {
const [format, setFormat] = useState(MultisigHDWallet.FORMAT_P2WSH);
const { isAdancedModeEnabled } = useContext(BlueStorageContext);
const [isAdvancedModeEnabledRender, setIsAdvancedModeEnabledRender] = useState(false);
const windowHeight = useWindowDimensions().height;
const windowWidth = useWindowDimensions().width;
const stylesHook = StyleSheet.create({
root: {
@ -111,14 +100,7 @@ const WalletsAddMultisig = () => {
const renderModal = () => {
return (
<Modal
isVisible={isModalVisible}
style={styles.bottomModal}
deviceHeight={windowHeight}
deviceWidth={windowWidth}
onBackdropPress={closeModal}
onBackButtonPress={closeModal}
>
<BottomModal isVisible={isModalVisible} onClose={closeModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContentShort, stylesHook.modalContentShort]}>
<Text style={[styles.textHeader, stylesHook.textHeader]}>{loc.multisig.quorum_header}</Text>
@ -181,7 +163,7 @@ const WalletsAddMultisig = () => {
/>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -252,10 +234,6 @@ const styles = StyleSheet.create({
filteTextWrapper: { right: 0, position: 'absolute' },
filterText: { fontSize: 16, color: 'gray' },
advancedOptionsContainer: {},
bottomModal: {
justifyContent: 'flex-end',
margin: 0,
},
item: {
paddingHorizontal: 0,
},

View File

@ -11,7 +11,6 @@ import {
StyleSheet,
Text,
TouchableOpacity,
useWindowDimensions,
View,
} from 'react-native';
import {
@ -29,12 +28,12 @@ import { Icon } from 'react-native-elements';
import { HDSegwitBech32Wallet, MultisigCosigner, MultisigHDWallet } from '../../class';
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
import loc from '../../loc';
import Modal from 'react-native-modal';
import { getSystemName } from 'react-native-device-info';
import ImagePicker from 'react-native-image-picker';
import ScanQRCode from '../send/ScanQRCode';
import QRCode from 'react-native-qrcode-svg';
import { SquareButton } from '../../components/SquareButton';
import BottomModal from '../../components/BottomModal';
import MultipleStepsListItem, {
MultipleStepsListItemButtohType,
MultipleStepsListItemDashType,
@ -54,8 +53,6 @@ const staticCache = {};
const WalletsAddMultisigStep2 = () => {
const { addWallet, saveToDisk, setNewWalletAdded } = useContext(BlueStorageContext);
const { colors } = useTheme();
const windowHeight = useWindowDimensions().height;
const windowWidth = useWindowDimensions().width;
const navigation = useNavigation();
const { m, n, format } = useRoute().params;
@ -501,14 +498,7 @@ const WalletsAddMultisigStep2 = () => {
const renderMnemonicsModal = () => {
return (
<Modal
isVisible={isMnemonicsModalVisible}
style={styles.bottomModal}
onBackButtonPress={Keyboard.dismiss}
deviceHeight={windowHeight}
deviceWidth={windowWidth}
onBackdropPress={Keyboard.dismiss}
>
<BottomModal isVisible={isMnemonicsModalVisible} onClose={Keyboard.dismiss}>
<View style={[styles.newKeyModalContent, stylesHook.modalContent]}>
<View style={styles.itemKeyUnprovidedWrapper}>
<View style={[styles.vaultKeyCircleSuccess, stylesHook.vaultKeyCircleSuccess]}>
@ -529,7 +519,7 @@ const WalletsAddMultisigStep2 = () => {
<BlueSpacing20 />
<BlueButton title={loc.send.success_done} onPress={() => setIsMnemonicsModalVisible(false)} />
</View>
</Modal>
</BottomModal>
);
};
@ -541,14 +531,7 @@ const WalletsAddMultisigStep2 = () => {
const renderProvideMnemonicsModal = () => {
return (
<Modal
deviceHeight={windowHeight}
deviceWidth={windowWidth}
isVisible={isProvideMnemonicsModalVisible}
style={styles.bottomModal}
onBackdropPress={hideProvideMnemonicsModal}
onBackButtonPress={hideProvideMnemonicsModal}
>
<BottomModal isVisible={isProvideMnemonicsModalVisible} onClose={hideProvideMnemonicsModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContent, stylesHook.modalContent]}>
<BlueTextCenteredHooks>{loc.multisig.type_your_mnemonics}</BlueTextCenteredHooks>
@ -563,7 +546,7 @@ const WalletsAddMultisigStep2 = () => {
<BlueButtonLinkHook disabled={isLoading} onPress={scanOrOpenFile} title={loc.wallets.import_scan_qr} />
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -579,14 +562,7 @@ const WalletsAddMultisigStep2 = () => {
const renderCosignersXpubModal = () => {
return (
<Modal
deviceHeight={windowHeight}
deviceWidth={windowWidth}
isVisible={isRenderCosignersXpubModalVisible}
style={styles.bottomModal}
onBackdropPress={hideCosignersXpubModal}
onBackButtonPress={hideCosignersXpubModal}
>
<BottomModal isVisible={isRenderCosignersXpubModalVisible} onClose={hideCosignersXpubModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContent, stylesHook.modalContent, styles.alignItemsCenter]}>
<Text style={[styles.headerText, stylesHook.textDestination]}>{loc.multisig.this_is_cosigners_xpub}</Text>
@ -611,7 +587,7 @@ const WalletsAddMultisigStep2 = () => {
</View>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
const footer = isLoading ? (
@ -690,10 +666,6 @@ const styles = StyleSheet.create({
},
provideKeyButtonText: { fontWeight: '600', fontSize: 15 },
textDestination: { fontWeight: '600' },
bottomModal: {
justifyContent: 'flex-end',
margin: 0,
},
modalContent: {
paddingHorizontal: 22,
paddingVertical: 32,

View File

@ -1,31 +1,32 @@
/* global alert */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Modal from 'react-native-modal';
import { Icon } from 'react-native-elements';
import {
ActivityIndicator,
Dimensions,
FlatList,
Image,
Keyboard,
KeyboardAvoidingView,
Dimensions,
Linking,
Platform,
SectionList,
StatusBar,
StyleSheet,
Text,
TextInput,
TouchableHighlight,
TouchableOpacity,
View,
StatusBar,
} from 'react-native';
import Geolocation from '@react-native-community/geolocation';
import { BlueButtonLink, BlueNavigationStyle, SafeBlueArea } from '../../BlueComponents';
import { HodlHodlApi } from '../../class/hodl-hodl-api';
import * as NavigationService from '../../NavigationService';
import Geolocation from '@react-native-community/geolocation';
import { BlueCurrentTheme } from '../../components/themes';
import BottomModal from '../../components/BottomModal';
import loc from '../../loc';
import { BlueStorageContext } from '../../blue_modules/storage-context';
const A = require('../../blue_modules/analytics');
@ -36,6 +37,7 @@ const METHOD_ANY = '_any';
const HodlHodlListSections = { OFFERS: 'OFFERS' };
const windowHeight = Dimensions.get('window').height;
Geolocation.setRNConfiguration({ authorizationLevel: 'whenInUse' });
export default class HodlHodl extends Component {
static contextType = BlueStorageContext;
constructor(props) {
@ -357,13 +359,7 @@ export default class HodlHodl extends Component {
renderChooseSideModal = () => {
return (
<Modal
isVisible={this.state.isChooseSideModalVisible}
style={styles.bottomModal}
deviceHeight={windowHeight}
onBackdropPress={this.hideChooseSideModal}
onBackButtonPress={this.hideChooseSideModal}
>
<BottomModal isVisible={this.state.isChooseSideModalVisible} onClose={this.hideChooseSideModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContentShort}>
<FlatList
@ -389,7 +385,7 @@ export default class HodlHodl extends Component {
/>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -400,10 +396,9 @@ export default class HodlHodl extends Component {
renderFiltersModal = () => {
return (
<Modal
<BottomModal
isVisible={this.state.isFiltersModalVisible}
style={styles.bottomModal}
deviceHeight={windowHeight}
onClose={this.hideFiltersModal}
onModalHide={() => {
if (this.state.openNextModal) {
const openNextModal = this.state.openNextModal;
@ -413,8 +408,6 @@ export default class HodlHodl extends Component {
});
}
}}
onBackdropPress={this.hideFiltersModal}
onBackButtonPress={this.hideFiltersModal}
>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContentShort}>
@ -464,7 +457,7 @@ export default class HodlHodl extends Component {
/>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -510,13 +503,7 @@ export default class HodlHodl extends Component {
}
return (
<Modal
deviceHeight={windowHeight}
isVisible={this.state.isChooseCountryModalVisible}
style={styles.bottomModal}
onBackdropPress={this.hideChooseCountryModal}
onBackButtonPress={this.hideChooseCountryModal}
>
<BottomModal isVisible={this.state.isChooseCountryModalVisible} onClose={this.hideChooseCountryModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<View style={styles.searchInputContainer}>
@ -555,7 +542,7 @@ export default class HodlHodl extends Component {
/>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -590,13 +577,7 @@ export default class HodlHodl extends Component {
}
return (
<Modal
isVisible={this.state.isChooseCurrencyVisible}
style={styles.bottomModal}
deviceHeight={windowHeight}
onBackdropPress={this.hideChooseCurrencyModal}
onBackButtonPress={this.hideChooseCurrencyModal}
>
<BottomModal isVisible={this.state.isChooseCurrencyVisible} onClose={this.hideChooseCurrencyModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<View style={styles.searchInputContainer}>
@ -635,7 +616,7 @@ export default class HodlHodl extends Component {
/>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -670,13 +651,7 @@ export default class HodlHodl extends Component {
}
return (
<Modal
isVisible={this.state.isChooseMethodVisible}
style={styles.bottomModal}
deviceHeight={windowHeight}
onBackdropPress={this.hideChooseMethodModal}
onBackButtonPress={this.hideChooseMethodModal}
>
<BottomModal isVisible={this.state.isChooseMethodVisible} deviceHeight={windowHeight} onClose={this.hideChooseMethodModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<View style={styles.searchInputContainer}>
@ -721,7 +696,7 @@ export default class HodlHodl extends Component {
/>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -950,10 +925,6 @@ const styles = StyleSheet.create({
minHeight: 200,
height: 200,
},
bottomModal: {
justifyContent: 'flex-end',
margin: 0,
},
Title: {
fontWeight: 'bold',
fontSize: 30,

View File

@ -8,12 +8,12 @@ import {
Linking,
Platform,
StyleSheet,
Dimensions,
Text,
TouchableHighlight,
TouchableOpacity,
View,
} from 'react-native';
import {
BlueButton,
BlueCopyTextToClipboard,
@ -24,12 +24,11 @@ import {
BlueTextHooks,
} from '../../BlueComponents';
import { HodlHodlApi } from '../../class/hodl-hodl-api';
import Modal from 'react-native-modal';
import * as NavigationService from '../../NavigationService';
import { BlueCurrentTheme } from '../../components/themes';
import BottomModal from '../../components/BottomModal';
import loc from '../../loc';
import { BlueStorageContext } from '../../blue_modules/storage-context';
const windowHeight = Dimensions.get('window').height;
export default class HodlHodlMyContracts extends Component {
static contextType = BlueStorageContext;
@ -172,13 +171,7 @@ export default class HodlHodlMyContracts extends Component {
if (!this.state.contractToDisplay) return;
return (
<Modal
isVisible={this.state.isRenderContractVisible}
style={styles.bottomModal}
deviceHeight={windowHeight}
onBackdropPress={this.hideContractModal}
onBackButtonPress={this.hideContractModal}
>
<BottomModal isVisible={this.state.isRenderContractVisible} onClose={this.hideContractModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<View style={styles.modalContentCentered}>
@ -256,7 +249,7 @@ export default class HodlHodlMyContracts extends Component {
</Text>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -351,10 +344,6 @@ const styles = StyleSheet.create({
flex: 1,
backgroundColor: BlueCurrentTheme.colors.elevated,
},
bottomModal: {
justifyContent: 'flex-end',
margin: 0,
},
modalContent: {
backgroundColor: BlueCurrentTheme.colors.modal,
padding: 22,

View File

@ -83,6 +83,7 @@ const WalletsList = () => {
useFocusEffect(
useCallback(() => {
verifyBalance();
StatusBar.setBarStyle('default');
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []),
);

View File

@ -1,43 +1,44 @@
/* global alert */
import React, { useEffect, useState, useCallback, useContext, useRef } from 'react';
import { Chain } from '../../models/bitcoinUnits';
import {
Text,
Platform,
StyleSheet,
View,
Keyboard,
ActivityIndicator,
FlatList,
ScrollView,
TouchableOpacity,
StatusBar,
Linking,
KeyboardAvoidingView,
Alert,
InteractionManager,
useWindowDimensions,
PixelRatio,
Dimensions,
FlatList,
InteractionManager,
Keyboard,
KeyboardAvoidingView,
Linking,
PixelRatio,
Platform,
ScrollView,
StatusBar,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import ImagePicker from 'react-native-image-picker';
import Clipboard from '@react-native-community/clipboard';
import { Icon } from 'react-native-elements';
import Handoff from 'react-native-handoff';
import { getSystemName } from 'react-native-device-info';
import { useRoute, useNavigation, useTheme, useFocusEffect } from '@react-navigation/native';
import { Chain } from '../../models/bitcoinUnits';
import { BlueTransactionListItem, BlueWalletNavigationHeader, BlueAlertWalletExportReminder, BlueListItem } from '../../BlueComponents';
import WalletGradient from '../../class/wallet-gradient';
import { Icon } from 'react-native-elements';
import { LightningCustodianWallet, WatchOnlyWallet } from '../../class';
import Modal from 'react-native-modal';
import HandoffSettings from '../../class/handoff';
import Handoff from 'react-native-handoff';
import ActionSheet from '../ActionSheet';
import loc from '../../loc';
import { FContainer, FButton } from '../../components/FloatButtons';
import { getSystemName } from 'react-native-device-info';
import { useRoute, useNavigation, useTheme, useFocusEffect } from '@react-navigation/native';
import BottomModal from '../../components/BottomModal';
import BuyBitcoin from './buyBitcoin';
import { BlueStorageContext } from '../../blue_modules/storage-context';
const BlueElectrum = require('../../blue_modules/BlueElectrum');
const LocalQRCode = require('@remobile/react-native-qrcode-local-image');
const isDesktop = getSystemName() === 'Mac OS X';
const buttonFontSize =
@ -61,8 +62,6 @@ const WalletTransactions = () => {
const { setParams, setOptions, navigate } = useNavigation();
const { colors } = useTheme();
const windowHeight = useWindowDimensions().height;
const windowWidth = useWindowDimensions().width;
const stylesHook = StyleSheet.create({
advancedTransactionOptionsModalContent: {
backgroundColor: colors.elevated,
@ -264,14 +263,7 @@ const WalletTransactions = () => {
const renderManageFundsModal = () => {
return (
<Modal
deviceHeight={windowHeight}
deviceWidth={windowWidth}
isVisible={isManageFundsModalVisible}
style={styles.bottomModal}
onBackdropPress={hideManageFundsModal}
onBackButtonPress={hideManageFundsModal}
>
<BottomModal isVisible={isManageFundsModalVisible} onClose={hideManageFundsModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.advancedTransactionOptionsModalContent, stylesHook.advancedTransactionOptionsModalContent]}>
<BlueListItem
@ -322,7 +314,7 @@ const WalletTransactions = () => {
/>
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -466,7 +458,7 @@ const WalletTransactions = () => {
);
};
const copyFromClipbard = async () => {
const copyFromClipboard = async () => {
onBarCodeRead({ data: await Clipboard.getString() });
};
@ -523,7 +515,7 @@ const WalletTransactions = () => {
},
});
} else if (buttonIndex === 3) {
copyFromClipbard();
copyFromClipboard();
}
});
} else if (Platform.OS === 'android') {
@ -553,7 +545,7 @@ const WalletTransactions = () => {
if (!isClipboardEmpty) {
buttons.push({
text: loc.wallets.list_long_clipboard,
onPress: copyFromClipbard,
onPress: copyFromClipboard,
});
}
ActionSheet.showActionSheetWithOptions({
@ -570,7 +562,7 @@ const WalletTransactions = () => {
{wallet.current.chain === Chain.ONCHAIN && isHandOffUseEnabled && (
<Handoff
title={`Bitcoin Wallet ${wallet.current.getLabel()}`}
type="io.bluewallet.current.bluewallet"
type="io.bluewallet.bluewallet"
url={`https://blockpath.com/search/addr?q=${wallet.current.getXpub()}`}
/>
)}
@ -605,7 +597,7 @@ const WalletTransactions = () => {
ListHeaderComponent={renderListHeaderComponent}
onEndReachedThreshold={0.3}
onEndReached={async () => {
// pagination in works. in this block we will add more txs to flatlist
// pagination in works. in this block we will add more txs to FlatList
// so as user scrolls closer to bottom it will render mode transactions
if (getTransactionsSliced(Infinity).length < limit) {
@ -740,10 +732,6 @@ const styles = StyleSheet.create({
borderColor: 'rgba(0, 0, 0, 0.1)',
minHeight: 130,
},
bottomModal: {
justifyContent: 'flex-end',
margin: 0,
},
walletDetails: {
marginHorizontal: 16,
minWidth: 150,

View File

@ -4,16 +4,22 @@ import {
ActivityIndicator,
Alert,
FlatList,
InteractionManager,
Keyboard,
KeyboardAvoidingView,
LayoutAnimation,
Platform,
StatusBar,
StyleSheet,
Text,
InteractionManager,
View,
LayoutAnimation,
} from 'react-native';
import { Icon } from 'react-native-elements';
import { useFocusEffect, useNavigation, useRoute, useTheme } from '@react-navigation/native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { getSystemName } from 'react-native-device-info';
import ImagePicker from 'react-native-image-picker';
import {
BlueButton,
BlueButtonHook,
@ -27,23 +33,19 @@ import {
BlueTextCentered,
} from '../../BlueComponents';
import SquareEnumeratedWords, { SquareEnumeratedWordsContentAlign } from '../../components/SquareEnumeratedWords';
import { Icon } from 'react-native-elements';
import BottomModal from '../../components/BottomModal';
import { HDSegwitBech32Wallet, MultisigHDWallet } from '../../class';
import { useFocusEffect, useNavigation, useRoute, useTheme } from '@react-navigation/native';
import loc from '../../loc';
import Modal from 'react-native-modal';
import { BlueStorageContext } from '../../blue_modules/storage-context';
import { SafeAreaView } from 'react-native-safe-area-context';
import MultipleStepsListItem, {
MultipleStepsListItemButtohType,
MultipleStepsListItemDashType,
} from '../../components/MultipleStepsListItem';
import { getSystemName } from 'react-native-device-info';
import ImagePicker from 'react-native-image-picker';
import ScanQRCode from '../send/ScanQRCode';
const isDesktop = getSystemName() === 'Mac OS X';
const LocalQRCode = require('@remobile/react-native-qrcode-local-image');
const isDesktop = getSystemName() === 'Mac OS X';
const ViewEditMultisigCosigners = () => {
const { colors } = useTheme();
const { wallets, setWalletsWithNewOrder } = useContext(BlueStorageContext);
@ -159,12 +161,7 @@ const ViewEditMultisigCosigners = () => {
const renderMnemonicsModal = () => {
return (
<Modal
isVisible={isMnemonicsModalVisible}
style={styles.bottomModal}
onBackdropPress={hideMnemonicsModal}
onBackButtonPress={hideMnemonicsModal}
>
<BottomModal isVisible={isMnemonicsModalVisible} onClose={hideMnemonicsModal}>
<View style={[styles.newKeyModalContent, stylesHook.modalContent]}>
<View style={styles.itemKeyUnprovidedWrapper}>
<View style={[styles.vaultKeyCircleSuccess, stylesHook.vaultKeyCircleSuccess]}>
@ -203,7 +200,7 @@ const ViewEditMultisigCosigners = () => {
<BlueSpacing20 />
<BlueButton title={loc.send.success_done} onPress={() => setIsMnemonicsModalVisible(false)} />
</View>
</Modal>
</BottomModal>
);
};
@ -429,12 +426,7 @@ const ViewEditMultisigCosigners = () => {
const renderProvideMnemonicsModal = () => {
return (
<Modal
isVisible={isProvideMnemonicsModalVisible}
style={styles.bottomModal}
onBackdropPress={hideProvideMnemonicsModal}
onBackButtonPress={hideProvideMnemonicsModal}
>
<BottomModal isVisible={isProvideMnemonicsModalVisible} onClose={hideProvideMnemonicsModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContent, stylesHook.modalContent]}>
<BlueTextCentered>{loc.multisig.type_your_mnemonics}</BlueTextCentered>
@ -453,7 +445,7 @@ const ViewEditMultisigCosigners = () => {
<BlueButtonLinkHook disabled={isLoading} onPress={scanOrOpenFile} title={loc.wallets.import_scan_qr} />
</View>
</KeyboardAvoidingView>
</Modal>
</BottomModal>
);
};
@ -532,10 +524,6 @@ const styles = StyleSheet.create({
borderTopRightRadius: 16,
borderColor: 'rgba(0, 0, 0, 0.1)',
},
bottomModal: {
justifyContent: 'flex-end',
margin: 0,
},
modalContent: {
padding: 22,
justifyContent: 'center',

View File

@ -66,6 +66,7 @@ describe('Bech32 Segwit HD (BIP84)', () => {
for (let c = 0; c < 1000; c++) {
await hd.generate();
const secret = hd.getSecret();
assert.strictEqual(secret.split(' ').length, 12);
if (hashmap[secret]) {
throw new Error('Duplicate secret generated!');
}