Skip to content

Commit

Permalink
enhancement: added loginOnCreate option to account creation service
Browse files Browse the repository at this point in the history
  • Loading branch information
dafuga committed Oct 29, 2021
1 parent 0dd17e7 commit 929a515
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/account-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface AccountCreationOptions {
*/
supportedChains?: Record<string, string>

loginRequest?: string
loginOnCreate?: boolean
}

const accountCreationUrl = 'https://create.anchor.link';
Expand All @@ -16,21 +16,21 @@ export class AccountCreation {

private popupWindow?: Window
private supportedChains?: Record<string, string>
private loginRequest?: string
private loginOnCreate?: boolean

constructor(public readonly options: AccountCreationOptions = {}) {
this.supportedChains = options.supportedChains
this.loginRequest = options.loginRequest
this.loginOnCreate = options.loginOnCreate
}

async createAccount() {
const popupWindowUrl =
`${
accountCreationUrl
}?skip_intro=true&supported_chains=${
}/product?supported_chains=${
this.supportedChains
}&login_request=${
this.loginRequest
}${
this.loginOnCreate ? '&login_on_create=true' : ''
}`;

this.popupWindow = window.open(
Expand Down

0 comments on commit 929a515

Please sign in to comment.