mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 15:20:55 +01:00
Merge branch 'master' into msmac
This commit is contained in:
commit
5b9bc82c91
1 changed files with 7 additions and 10 deletions
|
@ -57,7 +57,6 @@ const WalletsAddMultisigStep2 = () => {
|
|||
const { m, n, format } = useRoute().params;
|
||||
|
||||
const [cosigners, setCosigners] = useState([]); // array of cosigners user provided. if format [cosigner, fp, path]
|
||||
const [isOnCreateButtonEnabled, setIsOnCreateButtonEnabled] = useState(false);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [isMnemonicsModalVisible, setIsMnemonicsModalVisible] = useState(false);
|
||||
const [isProvideMnemonicsModalVisible, setIsProvideMnemonicsModalVisible] = useState(false);
|
||||
|
@ -184,12 +183,12 @@ const WalletsAddMultisigStep2 = () => {
|
|||
w.generate().then(() => {
|
||||
const cosignersCopy = [...cosigners];
|
||||
cosignersCopy.push([w.getSecret(), false, false]);
|
||||
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
||||
if (Platform.OS !== 'android') LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
||||
setCosigners(cosignersCopy);
|
||||
setVaultKeyData({ keyIndex: cosignersCopy.length, seed: w.getSecret(), xpub: w.getXpub(), isLoading: false });
|
||||
setIsLoading(true);
|
||||
setIsMnemonicsModalVisible(true);
|
||||
if (cosignersCopy.length === n) setIsOnCreateButtonEnabled(true);
|
||||
|
||||
// filling cache
|
||||
setTimeout(() => {
|
||||
// filling cache
|
||||
|
@ -279,9 +278,8 @@ const WalletsAddMultisigStep2 = () => {
|
|||
|
||||
const cosignersCopy = [...cosigners];
|
||||
cosignersCopy.push([xpub, fp, path]);
|
||||
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
||||
if (Platform.OS !== 'android') LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
||||
setCosigners(cosignersCopy);
|
||||
if (cosignersCopy.length === n) setIsOnCreateButtonEnabled(true);
|
||||
};
|
||||
|
||||
const useMnemonicPhrase = () => {
|
||||
|
@ -299,9 +297,9 @@ const WalletsAddMultisigStep2 = () => {
|
|||
|
||||
const cosignersCopy = [...cosigners];
|
||||
cosignersCopy.push([hd.getSecret(), false, false]);
|
||||
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
||||
if (Platform.OS !== 'android') LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
||||
setCosigners(cosignersCopy);
|
||||
if (cosignersCopy.length === n) setIsOnCreateButtonEnabled(true);
|
||||
|
||||
setIsProvideMnemonicsModalVisible(false);
|
||||
setIsLoading(false);
|
||||
setImportText('');
|
||||
|
@ -386,9 +384,8 @@ const WalletsAddMultisigStep2 = () => {
|
|||
|
||||
const cosignersCopy = [...cosigners];
|
||||
cosignersCopy.push([cosigner.getXpub(), cosigner.getFp(), cosigner.getPath()]);
|
||||
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
||||
if (Platform.OS !== 'android') LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
||||
setCosigners(cosignersCopy);
|
||||
if (cosignersCopy.length === n) setIsOnCreateButtonEnabled(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -659,7 +656,7 @@ const WalletsAddMultisigStep2 = () => {
|
|||
<BlueLoading />
|
||||
) : (
|
||||
<View style={styles.buttonBottom}>
|
||||
<BlueButton title={loc.multisig.create} onPress={onCreate} disabled={!isOnCreateButtonEnabled} />
|
||||
<BlueButton title={loc.multisig.create} onPress={onCreate} disabled={cosigners.length !== n} />
|
||||
</View>
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue