-
Notifications
You must be signed in to change notification settings - Fork 63
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 #1133 from madfish-solutions/development
- Loading branch information
Showing
53 changed files
with
399 additions
and
2,156 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
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
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 |
---|---|---|
|
@@ -45,3 +45,6 @@ DerivedData | |
|
||
#e2e | ||
video-rep | ||
|
||
#private package config | ||
.npmrc |
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,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
html, body { | ||
margin: 0; | ||
height: 100%; | ||
width: 100%; | ||
overflow-y: hidden; | ||
} | ||
</style> | ||
</head> | ||
<body></body> | ||
</html> |
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,15 @@ | ||
import { useMemo } from 'react'; | ||
|
||
import { useAccount, useAllAccounts } from 'lib/temple/front'; | ||
import { isAccountOfActableType } from 'lib/temple/helpers'; | ||
|
||
export const useAdsViewerPkh = () => { | ||
const allAccounts = useAllAccounts(); | ||
const selectedAccount = useAccount(); | ||
|
||
return useMemo(() => { | ||
if (isAccountOfActableType(selectedAccount)) return selectedAccount.publicKeyHash; | ||
|
||
return allAccounts[0].publicKeyHash; | ||
}, [allAccounts, selectedAccount]); | ||
}; |
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,30 @@ | ||
import { useEffect } from 'react'; | ||
|
||
import { useUserIdSelector } from 'app/store/settings/selectors'; | ||
import { ADS_VIEWER_ADDRESS_STORAGE_KEY, ANALYTICS_USER_ID_STORAGE_KEY } from 'lib/constants'; | ||
import { usePassiveStorage } from 'lib/temple/front/storage'; | ||
|
||
import { useAdsViewerPkh } from './use-ads-viewer-pkh'; | ||
|
||
export const useUserIdAccountPkhSync = () => { | ||
// User ID | ||
|
||
const [storedUserId, setStoredUserId] = usePassiveStorage<string>(ANALYTICS_USER_ID_STORAGE_KEY); | ||
const userId = useUserIdSelector(); | ||
|
||
useEffect(() => { | ||
if (userId !== storedUserId) { | ||
setStoredUserId(userId); | ||
} | ||
}, [setStoredUserId, storedUserId, userId]); | ||
|
||
// ADs viewer address | ||
|
||
const adsViewerAddress = useAdsViewerPkh(); | ||
|
||
const [adsViewerAddressStored, setAdsViewerAddress] = usePassiveStorage<string>(ADS_VIEWER_ADDRESS_STORAGE_KEY); | ||
|
||
useEffect(() => { | ||
if (adsViewerAddressStored !== adsViewerAddress) setAdsViewerAddress(adsViewerAddress); | ||
}, [adsViewerAddressStored, adsViewerAddress, setAdsViewerAddress]); | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.