Skip to content

Commit

Permalink
chore: removed the enableSessions setting
Browse files Browse the repository at this point in the history
  • Loading branch information
dafuga authored and aaroncox committed Apr 17, 2023
1 parent 49b81ca commit eb00e55
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 32 deletions.
3 changes: 1 addition & 2 deletions app/modules/handler/actions/uri.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ export function signIdentityRequest(
settings,
sessions,
} = getState();
const { enableSessions } = settings;
dispatch({
type: types.SYSTEM_ESRURISIGN_PENDING
});
Expand Down Expand Up @@ -365,7 +364,7 @@ export function signIdentityRequest(
serializedTransaction: prompt.resolved.serializedTransaction,
});
const callbackParams = prompt.resolved.getCallback(signed.signatures, 0);
if (enableSessions && prompt.resolved.request.isIdentity()) {
if (prompt.resolved.request.isIdentity()) {
const { info } = prompt.resolved.request.data;
const isLinkSession = info.some((i) => i.key === 'link');
if (isLinkSession) {
Expand Down
8 changes: 0 additions & 8 deletions app/modules/handler/containers/Prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,6 @@ class PromptContainer extends Component<Props> {
}
});
};
toggleSessions = () => {
this.props.actions.setSetting('enableSessions', !this.props.settings.enableSessions);
}
render() {
const {
prompt,
Expand All @@ -210,9 +207,6 @@ class PromptContainer extends Component<Props> {
wallet,
whitelist,
} = this.state;
const {
enableSessions
} = settings;
const {
response
} = prompt;
Expand Down Expand Up @@ -253,7 +247,6 @@ class PromptContainer extends Component<Props> {
/>
<PromptStage
blockchain={blockchain}
enableSessions={enableSessions}
enableWhitelist={enableWhitelist}
expiration={expiration}
hasBroadcast={hasBroadcast}
Expand All @@ -268,7 +261,6 @@ class PromptContainer extends Component<Props> {
shouldBroadcast={shouldBroadcast}
swapAccount={this.swapAccount}
swapChain={this.swapChain}
toggleSessions={this.toggleSessions}
wallet={wallet}
whitelist={whitelist}
/>
Expand Down
5 changes: 0 additions & 5 deletions app/modules/handler/containers/Stage.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ class PromptStage extends Component<Props> {
auths,
blockchain,
blockchains,
enableSessions,
enableWhitelist,
expiration,
hasBroadcast,
Expand All @@ -225,7 +224,6 @@ class PromptStage extends Component<Props> {
status,
system,
t,
toggleSessions,
validate,
wallet,
whitelist,
Expand Down Expand Up @@ -451,10 +449,8 @@ class PromptStage extends Component<Props> {
blockchains={blockchains}
canSign={canSign}
couldSignWithDevice={couldSignWithDevice}
enableSessions={enableSessions}
onSelect={this.props.swapAccount}
onSelectChain={this.props.swapChain}
toggleSessions={toggleSessions}
wallet={wallet}
/>
);
Expand All @@ -471,7 +467,6 @@ class PromptStage extends Component<Props> {
nextAction = (
<PromptActionIdentity
disabled={signing || !canSign}
enableSessions={enableSessions}
loading={signing}
onClick={this.onSignIdentity}
wallet={wallet}
Expand Down
15 changes: 0 additions & 15 deletions app/modules/handler/containers/Stage/Identity.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class PromptStageIdentity extends Component<Props> {
actions,
canSign,
couldSignWithDevice,
enableSessions,
ledger,
onSelect,
onSelectChain,
Expand Down Expand Up @@ -111,20 +110,6 @@ class PromptStageIdentity extends Component<Props> {
onSelect={onSelect}
/>
</Form.Field>
<Form.Field>
<Segment basic textAlign="center">
<Header
content="Options"
size="small"
/>
<Form.Checkbox
checked={enableSessions}
label="Create a session for future use with this app"
onChange={this.props.toggleSessions}
toggle
/>
</Segment>
</Form.Field>
</Form>
{(!canSign && couldSignWithDevice)
? (
Expand Down
2 changes: 0 additions & 2 deletions app/shared/reducers/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ const initialState = {
displayResourcesAvailable: true,
// Whether or not to display known testnets for the various networks
displayTestNetworks: true,
// Whether or not to establish sessions with apps
enableSessions: true,
// Default filter spam transfers to false
filterSpamTransfersUnder: 0.0000,
// If Greymass Fuel is enabled or not
Expand Down

0 comments on commit eb00e55

Please sign in to comment.