@dynamic-labs/utils
Advanced tools
Comparing version
'use client' | ||
var version = "4.8.3"; | ||
var version = "4.8.4"; | ||
export { version }; |
{ | ||
"name": "@dynamic-labs/utils", | ||
"version": "4.8.3", | ||
"version": "4.8.4", | ||
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.", | ||
@@ -23,5 +23,5 @@ "author": "Dynamic Labs, Inc.", | ||
"tldts": "6.0.16", | ||
"@dynamic-labs/assert-package-version": "4.8.3", | ||
"@dynamic-labs/logger": "4.8.3", | ||
"@dynamic-labs/types": "4.8.3", | ||
"@dynamic-labs/assert-package-version": "4.8.4", | ||
"@dynamic-labs/logger": "4.8.4", | ||
"@dynamic-labs/types": "4.8.4", | ||
"buffer": "6.0.3", | ||
@@ -28,0 +28,0 @@ "eventemitter3": "5.0.1" |
@@ -8,4 +8,4 @@ 'use client' | ||
const handleMobileWalletRedirect = ({ nativeLink, universalLink, }) => { | ||
const url = encodeURIComponent(window.location.toString()); | ||
const ref = encodeURIComponent(window.location.origin); | ||
const url = encodeURIComponent(PlatformService.getUrl().href); | ||
const ref = encodeURIComponent(PlatformService.getOrigin()); | ||
// samsung browser only supports native links, not universal links | ||
@@ -12,0 +12,0 @@ if (isSamsungBrowser()) { |
@@ -22,2 +22,3 @@ 'use client' | ||
}, | ||
getUrl: () => new URL(window.location.href), | ||
isNativeMobile: false, | ||
@@ -24,0 +25,0 @@ openURL: (url_1, ...args_1) => __awaiter(void 0, [url_1, ...args_1], void 0, function* (url, target = 'self', features = '') { |
@@ -35,2 +35,8 @@ import { IPlatformService } from './types'; | ||
static get getHostname(): () => string; | ||
/** | ||
* Gets the current URL. | ||
* | ||
* @example new URL(window.location.href) | ||
*/ | ||
static get getUrl(): () => URL; | ||
static get getTLD(): () => string | undefined; | ||
@@ -37,0 +43,0 @@ /** |
@@ -55,2 +55,10 @@ 'use client' | ||
} | ||
/** | ||
* Gets the current URL. | ||
* | ||
* @example new URL(window.location.href) | ||
*/ | ||
static get getUrl() { | ||
return _a.implementation.getUrl; | ||
} | ||
static get getTLD() { | ||
@@ -57,0 +65,0 @@ return _a.implementation.getTLD; |
@@ -20,2 +20,8 @@ export interface IPlatformService { | ||
/** | ||
* Gets the current URL. | ||
* | ||
* @example new URL(window.location.href) | ||
*/ | ||
getUrl(): URL; | ||
/** | ||
* Gets the origin of the current location. | ||
@@ -22,0 +28,0 @@ * |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
659772
0.23%5815
0.52%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated