This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from Unboxed-Software/fix/v4.2.2
Fix: v4.2.2
- Loading branch information
Showing
5 changed files
with
132 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
export type Chain = 'evm' | 'solana' | 'flow'; | ||
export type Template = | ||
| 'nextjs-dedicated-wallet' | ||
| 'nextjs-universal-wallet' | ||
| 'nextjs-solana-dedicated-wallet' | ||
| 'nextjs-flow-universal-wallet' | ||
| 'nextjs-flow-dedicated-wallet'; | ||
|
||
export type Product = 'universal' | 'dedicated'; | ||
|
||
export function mapTemplateToChain(template: string): Chain | undefined { | ||
switch (template) { | ||
case 'nextjs-dedicated-wallet': | ||
case 'nextjs-universal-wallet': | ||
return 'evm'; | ||
case 'nextjs-solana-dedicated-wallet': | ||
return 'solana'; | ||
case 'nextjs-flow-universal-wallet': | ||
case 'nextjs-flow-dedicated-wallet': | ||
return 'flow'; | ||
default: | ||
return undefined; | ||
} | ||
} | ||
|
||
export function mapTemplateToProduct(template: string): Product | undefined { | ||
switch (template) { | ||
case 'nextjs-dedicated-wallet': | ||
case 'nextjs-solana-dedicated-wallet': | ||
case 'nextjs-flow-dedicated-wallet': | ||
return 'dedicated'; | ||
case 'nextjs-universal-wallet': | ||
case 'nextjs-flow-universal-wallet': | ||
return 'universal'; | ||
default: | ||
return undefined; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters