mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 01:34:57 +01:00
Fix/AssetSelection: Algo symbol & DID & Total price issues when no wallet connected (#559)
* fixed total price calculation issues * fixed algoSymbol and Did dissappear in Safari
This commit is contained in:
parent
0ea01ac932
commit
6c3cf1f121
@ -107,7 +107,9 @@
|
||||
|
||||
.did {
|
||||
padding: 0;
|
||||
font-size: var(--font-size-mini);
|
||||
/* font-size: var(--font-size-mini); */
|
||||
/* hack to make DotDotDot clamp work in Safari*/
|
||||
font-size: 0.63rem;
|
||||
display: block;
|
||||
text-align: left;
|
||||
color: var(--color-secondary);
|
||||
|
@ -261,26 +261,30 @@ export default function Compute({
|
||||
}, [ocean, ddo, accountId])
|
||||
|
||||
useEffect(() => {
|
||||
if (!ocean || !accountId || !selectedAlgorithmAsset) return
|
||||
if (!selectedAlgorithmAsset) return
|
||||
|
||||
if (selectedAlgorithmAsset.findServiceByType('access')) {
|
||||
checkPreviousOrders(selectedAlgorithmAsset).then(() => {
|
||||
if (
|
||||
!hasPreviousAlgorithmOrder &&
|
||||
selectedAlgorithmAsset.findServiceByType('compute')
|
||||
) {
|
||||
checkPreviousOrders(selectedAlgorithmAsset)
|
||||
}
|
||||
})
|
||||
} else if (selectedAlgorithmAsset.findServiceByType('compute')) {
|
||||
checkPreviousOrders(selectedAlgorithmAsset)
|
||||
}
|
||||
checkAssetDTBalance(selectedAlgorithmAsset)
|
||||
initMetadata(selectedAlgorithmAsset)
|
||||
|
||||
const { timeout } = (
|
||||
ddo.findServiceByType('access') || ddo.findServiceByType('compute')
|
||||
).attributes.main
|
||||
setAlgorithmTimeout(secondsToString(timeout))
|
||||
|
||||
if (accountId) {
|
||||
if (selectedAlgorithmAsset.findServiceByType('access')) {
|
||||
checkPreviousOrders(selectedAlgorithmAsset).then(() => {
|
||||
if (
|
||||
!hasPreviousAlgorithmOrder &&
|
||||
selectedAlgorithmAsset.findServiceByType('compute')
|
||||
) {
|
||||
checkPreviousOrders(selectedAlgorithmAsset)
|
||||
}
|
||||
})
|
||||
} else if (selectedAlgorithmAsset.findServiceByType('compute')) {
|
||||
checkPreviousOrders(selectedAlgorithmAsset)
|
||||
}
|
||||
}
|
||||
ocean && checkAssetDTBalance(selectedAlgorithmAsset)
|
||||
}, [selectedAlgorithmAsset, ocean, accountId, hasPreviousAlgorithmOrder])
|
||||
|
||||
// Output errors in toast UI
|
||||
|
Loading…
Reference in New Issue
Block a user