Skip to content

Commit

Permalink
🎨 Set the login social options as a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Jul 15, 2024
1 parent 5f187b7 commit 8527d81
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ const SESSION_KEY = 'likecoin_wallet_connector_session';

const WC_BRIGDE = 'https://bridge.walletconnect.org';

const SOCIAL_LOGIN_OPTIONS = {
HIDE_SOCIAL: 'likecoin-app-hidesocial',
DEFAULT: 'likecoin-app',
};

export class LikeCoinWalletConnector {
public options: LikeCoinWalletConnectorOptions;

Expand Down Expand Up @@ -350,7 +355,7 @@ export class LikeCoinWalletConnector {
init = async (
methodType: LikeCoinWalletConnectorMethodType,
params?: any,
language = this.options.language,
language = this.options.language
) => {
let initiator: Promise<LikeCoinWalletConnectorInitResponse>;

Expand All @@ -370,7 +375,12 @@ export class LikeCoinWalletConnector {
resolve(undefined);
this._events.emit('authcore_auth_closed');
}}
isHideSocialLogin={!!(this.options.authcoreClientId === 'likecoin-app-hidesocial')}
isHideSocialLogin={
!!(
this.options.authcoreClientId ===
SOCIAL_LOGIN_OPTIONS.HIDE_SOCIAL
)
}
/>
</IntlProvider>
);
Expand Down

0 comments on commit 8527d81

Please sign in to comment.