Skip to content

Commit cca2cea

Browse files
authored
Wallets (keybase#25796)
1 parent e914c88 commit cca2cea

23 files changed

Lines changed: 538 additions & 132 deletions

File tree

‎go/client/cmd_wallet.go‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,33 @@ import (
1111
func newCmdWallet(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command {
1212
// please keep sorted
1313
subcommands := []cli.Command{
14-
newCmdWalletAddTrustline(cl, g),
15-
newCmdWalletAPI(cl, g),
16-
newCmdWalletAssetSearch(cl, g),
14+
// newCmdWalletAddTrustline(cl, g),
15+
// newCmdWalletAPI(cl, g),
16+
// newCmdWalletAssetSearch(cl, g),
1717
newCmdWalletBalances(cl, g),
18-
newCmdWalletCancel(cl, g),
19-
newCmdWalletCancelAll(cl, g),
20-
newCmdWalletCancelRequest(cl, g),
21-
newCmdWalletChangeTrustlineLimit(cl, g),
22-
newCmdWalletDeleteTrustline(cl, g),
18+
// newCmdWalletCancel(cl, g),
19+
// newCmdWalletCancelAll(cl, g),
20+
// newCmdWalletCancelRequest(cl, g),
21+
// newCmdWalletChangeTrustlineLimit(cl, g),
22+
// newCmdWalletDeleteTrustline(cl, g),
2323
newCmdWalletDetail(cl, g),
2424
newCmdWalletExport(cl, g),
25-
newCmdWalletGetInflation(cl, g),
26-
newCmdWalletGetStarted(cl, g),
27-
newCmdWalletHistory(cl, g),
28-
newCmdWalletImport(cl, g),
29-
newCmdWalletLookup(cl, g),
30-
newCmdWalletMerge(cl, g),
31-
newCmdWalletPopularAssets(cl, g),
32-
newCmdWalletRename(cl, g),
33-
newCmdWalletRequest(cl, g),
34-
newCmdWalletSend(cl, g),
35-
newCmdWalletSendPathPayment(cl, g),
36-
newCmdWalletSetCurrency(cl, g),
37-
newCmdWalletSetInflation(cl, g),
38-
newCmdWalletSetMobileOnly(cl, g),
39-
newCmdWalletSetPrimary(cl, g),
40-
newCmdWalletSign(cl, g),
25+
// newCmdWalletGetInflation(cl, g),
26+
// newCmdWalletGetStarted(cl, g),
27+
// newCmdWalletHistory(cl, g),
28+
// newCmdWalletImport(cl, g),
29+
// newCmdWalletLookup(cl, g),
30+
// newCmdWalletMerge(cl, g),
31+
// newCmdWalletPopularAssets(cl, g),
32+
// newCmdWalletRename(cl, g),
33+
// newCmdWalletRequest(cl, g),
34+
// newCmdWalletSend(cl, g),
35+
// newCmdWalletSendPathPayment(cl, g),
36+
// newCmdWalletSetCurrency(cl, g),
37+
// newCmdWalletSetInflation(cl, g),
38+
// newCmdWalletSetMobileOnly(cl, g),
39+
// newCmdWalletSetPrimary(cl, g),
40+
// newCmdWalletSign(cl, g),
4141
}
4242
subcommands = append(subcommands, getBuildSpecificWalletCommands(cl, g)...)
4343
sort.Sort(cli.ByName(subcommands))

‎go/client/commands_devel.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ func getBuildSpecificAccountCommands(cl *libcmdline.CommandLine, g *libkb.Global
5959

6060
func getBuildSpecificWalletCommands(cl *libcmdline.CommandLine, g *libkb.GlobalContext) []cli.Command {
6161
return []cli.Command{
62-
newCmdWalletDump(cl, g),
63-
newCmdWalletHandleURI(cl, g),
64-
newCmdWalletInit(cl, g),
62+
// newCmdWalletDump(cl, g),
63+
// newCmdWalletHandleURI(cl, g),
64+
// newCmdWalletInit(cl, g),
6565
}
6666
}
6767

‎shared/actions/chat2/index.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,11 +1822,15 @@ const messageSend = async (
18221822
{
18231823
customResponseIncomingCallMap: {
18241824
'chat.1.chatUi.chatStellarDataConfirm': ({summary}, response) => {
1825-
storeStellarConfirmWindowResponse(false, response)
1825+
// immediate fail
1826+
response.result(false)
1827+
//storeStellarConfirmWindowResponse(false, response)
18261828
return Chat2Gen.createSetPaymentConfirmInfo({summary})
18271829
},
18281830
'chat.1.chatUi.chatStellarDataError': ({error}, response) => {
1829-
storeStellarConfirmWindowResponse(false, response)
1831+
// immediate fail
1832+
response.result(false)
1833+
//storeStellarConfirmWindowResponse(false, response)
18301834
return Chat2Gen.createSetPaymentConfirmInfo({error})
18311835
},
18321836
},

‎shared/actions/wallets.tsx‎

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/consistent-type-imports */
12
import * as Chat2Gen from './chat2-gen'
23
import * as ConfigGen from './config-gen'
34
import * as Constants from '../constants/wallets'
@@ -1635,6 +1636,95 @@ const onTeamBuildingAdded = (_: Container.TypedState, action: TeamBuildingGen.Ad
16351636
}
16361637

16371638
const initWallets = () => {
1639+
Container.listenAction([WalletsGen.loadAccounts, WalletsGen.deletedAccount], loadAccounts)
1640+
Container.listenAction(WalletsGen.showTransaction, () =>
1641+
RouteTreeGen.createNavigateAppend({path: ['walletOnboarding']})
1642+
)
1643+
Container.listenAction(WalletsGen.deleteAccount, deleteAccount)
1644+
1645+
// silence warnings
1646+
createdOrLinkedAccount
1647+
loadAccounts
1648+
loadAssets
1649+
loadDisplayCurrencies
1650+
loadPayments
1651+
loadWalletDisclaimer
1652+
refreshTrustlineAcceptedAssetsByUsername
1653+
spawnBuildPayment
1654+
acceptDisclaimer
1655+
acceptSEP7Path
1656+
acceptSEP7Pay
1657+
acceptSEP7Tx
1658+
accountDetailsUpdate
1659+
accountsUpdate
1660+
addTrustline
1661+
assetDeposit
1662+
assetWithdraw
1663+
buildPayment
1664+
calculateBuildingAdvanced
1665+
cancelPayment
1666+
cancelRequest
1667+
changeAccountName
1668+
changeDisplayCurrency
1669+
changeMobileOnlyMode
1670+
checkDisclaimer
1671+
clearBuilding
1672+
clearBuiltPayment
1673+
clearBuiltRequest
1674+
clearErrors
1675+
commonListenActions
1676+
createNewAccount
1677+
deleteAccount
1678+
deleteTrustline
1679+
deletedAccount
1680+
exitFailedPayment
1681+
exportSecretKey
1682+
filterForNs
1683+
linkExistingAccount
1684+
loadDisplayCurrency
1685+
loadExternalPartners
1686+
loadMobileOnlyMode
1687+
loadMorePayments
1688+
loadPaymentDetail
1689+
loadSendAssetChoices
1690+
loadStaticConfig
1691+
loadWalletDisclaimer
1692+
markAsRead
1693+
maybeClearErrors
1694+
maybeNavigateAwayFromSendForm
1695+
maybeNavigateToConversationFromPayment
1696+
maybeNavigateToConversationFromRequest
1697+
maybePopulateBuildingCurrency
1698+
maybeSelectDefaultAccount
1699+
navigateToAccount
1700+
navigateToTransaction
1701+
navigateUp
1702+
onTeamBuildingAdded
1703+
openSendRequestForm
1704+
paymentReviewed
1705+
pendingPaymentsUpdate
1706+
readLastSentXLM
1707+
receivedBadgeState
1708+
recentPaymentsUpdate
1709+
refreshAssets
1710+
refreshTrustlineAcceptedAssets
1711+
refreshTrustlinePopularAssets
1712+
rejectDisclaimer
1713+
requestPayment
1714+
reviewPayment
1715+
searchTrustlineAssets
1716+
sendPayment
1717+
sendPaymentAdvanced
1718+
setAccountAsDefault
1719+
setLastSentXLM
1720+
startPayment
1721+
stopPayment
1722+
validateAccountName
1723+
validateSEP7Link
1724+
validateSecretKey
1725+
writeLastSentXLM
1726+
1727+
/*
16381728
Container.listenAction(WalletsGen.createNewAccount, createNewAccount)
16391729
Container.listenAction(
16401730
[
@@ -1775,6 +1865,7 @@ const initWallets = () => {
17751865
Container.listenAction(WalletsGen.assetWithdraw, assetWithdraw)
17761866
commonListenActions('wallets')
17771867
Container.listenAction(TeamBuildingGen.addUsersToTeamSoFar, filterForNs('wallets', onTeamBuildingAdded))
1868+
*/
17781869
}
17791870

17801871
export default initWallets

‎shared/chat/routes.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type ChatInstallBotPick from './conversation/bot/team-picker'
1818
import type ChatLocationPopup from './conversation/input-area/normal/location-popup'
1919
import type ChatNewChat from '../team-building/container'
2020
import type ChatPDF from './pdf'
21-
import type ChatPaymentsConfirm from './payments/confirm/container'
21+
// import type ChatPaymentsConfirm from './payments/confirm/container'
2222
import type ChatRoot from './inbox/container'
2323
import type ChatSearchBot from './conversation/bot/search'
2424
import type ChatShowNewTeamDialog from './new-team-dialog-container'
@@ -35,6 +35,10 @@ export const newRoutes = {
3535
chatEnterPaperkey: {
3636
getScreen: (): typeof ChatEnterPaperkey => require('./conversation/rekey/enter-paper-key').default,
3737
},
38+
// was modal
39+
chatPaymentsConfirm: {
40+
getScreen: () => require('../wallets/keep').default,
41+
},
3842
chatRoot: {
3943
getOptions: ({navigation, route}) =>
4044
ChatConstants.isSplit
@@ -100,9 +104,11 @@ export const newModalRoutes = {
100104
},
101105
chatNewChat: {getScreen: (): typeof ChatNewChat => require('../team-building/container').default},
102106
chatPDF: {getScreen: (): typeof ChatPDF => require('./pdf').default},
107+
/*
103108
chatPaymentsConfirm: {
104109
getScreen: (): typeof ChatPaymentsConfirm => require('./payments/confirm/container').default,
105110
},
111+
*/
106112
chatSearchBots: {
107113
getScreen: (): typeof ChatSearchBot => require('./conversation/bot/search').default,
108114
},

‎shared/common-adapters/button.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ const commonLabel = () =>
352352
color: Styles.globalColors.whiteOrWhite,
353353
textAlign: 'center',
354354
},
355-
isElectron: {whiteSpace: 'pre'},
355+
isElectron: {whiteSpace: 'pre', userSelect: 'none'},
356356
isMobile: {lineHeight: undefined},
357357
})
358358

‎shared/deeplinks/error.tsx‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,27 @@ export const KeybaseLinkErrorBody = (props: KeybaseLinkErrorBodyProps) => {
2222
)
2323
}
2424

25-
type OwnProps = Container.RouteProps<'keybaseLinkError'>
25+
// type OwnProps = Container.RouteProps<'keybaseLinkError'>
2626

27-
const KeybaseLinkError = (props: OwnProps) => {
28-
const errorSource = props.route.params?.errorSource ?? 'app'
27+
const KeybaseLinkError = (/*props: OwnProps*/) => {
28+
// const errorSource = props.route.params?.errorSource ?? 'app'
2929
const message = Container.useSelector(s => {
30+
/*
3031
switch (errorSource) {
3132
case 'app':
32-
return s.deeplinks.keybaseLinkError
33+
*/
34+
return s.deeplinks.keybaseLinkError
35+
/*
3336
case 'sep7':
3437
return s.wallets.sep7ConfirmError
3538
case 'sep6':
3639
return s.wallets.sep6Message
3740
default:
3841
return 'unknown'
39-
}
42+
}*/
4043
})
41-
const sep6Error = Container.useSelector(s => s.wallets.sep6Error)
42-
const isError = errorSource !== 'sep6' || sep6Error
44+
// const sep6Error = Container.useSelector(s => s.wallets.sep6Error)
45+
const isError = true // errorSource !== 'sep6' || sep6Error
4346
const dispatch = Container.useDispatch()
4447
const onClose = () => dispatch(RouteTreeGen.createNavigateUp())
4548
return <KeybaseLinkErrorBody onCancel={onClose} isError={isError} message={message} />

‎shared/settings/routes.native.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type PushPrompt from './notifications/push-prompt.native'
77
import type ScreenprotectorTab from './screenprotector.native'
88
import type RootPhone from './root-phone.native'
99
import type RootTablet from './root-desktop-tablet'
10-
import type WalletsTab from '../wallets/wallet/container'
10+
//import type WalletsTab from '../wallets/wallet/container'
1111
import type WebLink from './web-links.native'
1212
import {sharedNewRoutes, sharedNewModalRoutes} from './routes.shared'
1313

@@ -20,7 +20,9 @@ export const newRoutes = {
2020
? {}
2121
: {
2222
[Constants.walletsTab]: {
23-
getScreen: (): typeof WalletsTab => require('../wallets/wallet/container').default,
23+
getOptions: () => ({title: 'Wallet'}),
24+
getScreen: () => require('../wallets/keep').default,
25+
// getScreen: (): typeof WalletsTab => require('../wallets/wallet/container').default,
2426
},
2527
}),
2628
[Constants.screenprotectorTab]: {

‎shared/wallets/create-account/container.tsx‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ export default Container.connect(
1515
nameValidationState: state.wallets.accountNameValidationState,
1616
waiting: anyWaiting(state, Constants.createNewAccountWaitingKey, Constants.validateAccountNameWaitingKey),
1717
}),
18-
(dispatch, ownProps: OwnProps) => ({
18+
(dispatch /*, ownProps: OwnProps*/) => ({
1919
onCancel: () => dispatch(RouteTreeGen.createNavigateUp()),
2020
onClearErrors: () => dispatch(WalletsGen.createClearErrors()),
21-
onCreateAccount: (name: string) => {
22-
dispatch(
23-
WalletsGen.createCreateNewAccount({
24-
name,
25-
setBuildingTo: ownProps.route.params?.fromSendForm,
26-
showOnCreation: ownProps.route.params?.showOnCreation,
27-
})
28-
)
21+
onCreateAccount: (/*name: string*/) => {
22+
// dispatch(
23+
// WalletsGen.createCreateNewAccount({
24+
// name,
25+
// setBuildingTo: ownProps.route.params?.fromSendForm,
26+
// showOnCreation: ownProps.route.params?.showOnCreation,
27+
// })
28+
// )
2929
dispatch(RouteTreeGen.createNavigateUp())
3030
},
3131
onDone: (name: string) => {

0 commit comments

Comments
 (0)