Skip to content

Commit

Permalink
Wire up cosigner export screen in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
tanx committed Jan 19, 2021
1 parent 93fb89a commit d046164
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
22 changes: 22 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import SendPsbtScreen from './screen/send-psbt';
import SendConfirmScreen from './screen/send-confirm';
import SendSuccessScreen from './screen/send-success';
import SettingsScreen from './screen/settings';
import CosignerExportScreen from './screen/cosigner-export';
import EmailSetScreen from './screen/email-set';
import EmailPinScreen from './screen/email-pin';
import EmailVerifyScreen from './screen/email-verify';
Expand All @@ -35,6 +36,7 @@ const PinChangeStack = createStackNavigator();
const PinCheckStack = createStackNavigator();
const RestoreStack = createStackNavigator();
const EmailSetStack = createStackNavigator();
const CosignerExportStack = createStackNavigator();
const MainStack = createBottomTabNavigator();
const RootStack = createStackNavigator();

Expand Down Expand Up @@ -139,6 +141,21 @@ const PinChangeStackScreen = () => (
</PinChangeStack.Navigator>
);

const CosignerExportStackScreen = () => (
<CosignerExportStack.Navigator>
<CosignerExportStack.Screen
name="CosignerExport"
component={CosignerExportScreen}
options={{
title: 'Export Cosigner',
headerLeft: () => (
<HeaderBackButton label="Settings" onPress={() => nav.goBack()} />
),
}}
/>
</CosignerExportStack.Navigator>
);

const PinCheckStackScreen = () => (
<PinCheckStack.Navigator>
<PinCheckStack.Screen
Expand Down Expand Up @@ -284,6 +301,11 @@ const App = () => (
component={PinChangeStackScreen}
options={{headerShown: false}}
/>
<RootStack.Screen
name="CosignerExport"
component={CosignerExportStackScreen}
options={{headerShown: false}}
/>
</RootStack.Navigator>
</NavigationContainer>
);
Expand Down
8 changes: 7 additions & 1 deletion src/screen/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const styles = StyleSheet.create({
padding: 15,
},
btnWrapper: {
marginTop: 50,
marginTop: 40,
alignItems: 'center',
},
});
Expand All @@ -31,6 +31,12 @@ const SettingsScreen = () => (
<View style={styles.btnWrapper}>
<Button title="Change PIN" onPress={() => backup.initPinChange()} />
</View>
<View style={styles.btnWrapper}>
<Button
title="Export Cosigner"
onPress={() => multisig.initCosignerExport()}
/>
</View>
<View style={styles.btnWrapper}>
<Button
title="Import ColdCard"
Expand Down

0 comments on commit d046164

Please sign in to comment.