Skip to content

Commit

Permalink
refactor(sample): inline variable, use staging, remove useless await
Browse files Browse the repository at this point in the history
  • Loading branch information
mt-dfrey committed Oct 4, 2023
1 parent bf9b14a commit 04c119b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sample/src/index.ts
Expand Up @@ -23,8 +23,6 @@ interface ITokenInfo {
scopes: string[];
}

const AWESOME_APP_ID = 'af84f08f40970caf17f2e53b31771ceb50d0f32f7d44b826753982e809395290';

// Re-initialize when clicked
elements.initializeBtn.onclick = () => {
const commonOptions: InitOptions = {};
Expand Down Expand Up @@ -79,7 +77,7 @@ elements.doOnboardBtn.onclick = async () => {
onBoardOptions.email = onboardOptionsElms.email.value;
onBoardOptions.pkce = true;

await mtLinkSdk.onboard(onBoardOptions);
mtLinkSdk.onboard(onBoardOptions);
} catch (error) {
console.log(error);
}
Expand Down Expand Up @@ -242,11 +240,11 @@ elements.openServiceOptionsElms.vaultView.onchange = () => {
};

const initializeLinkSDK = (options: InitOptions = {}) => {
mtLinkSdk.init(AWESOME_APP_ID, {
mtLinkSdk.init('af84f08f40970caf17f2e53b31771ceb50d0f32f7d44b826753982e809395290', {
sdkPlatform: 'js',
redirectUri: 'https://localhost:9000',
locale: 'en',
mode: 'develop',
mode: 'staging',
...options
});
};
Expand Down

0 comments on commit 04c119b

Please sign in to comment.