mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Setting payment collector inline
This commit is contained in:
parent
2265d750a5
commit
5ab6b7dc66
@ -13,13 +13,11 @@ export default function MetaFull({ ddo }: { ddo: Asset }): ReactElement {
|
||||
|
||||
useEffect(() => {
|
||||
async function getInitialPaymentCollector() {
|
||||
let paymentCollector
|
||||
try {
|
||||
const datatoken = new Datatoken(web3)
|
||||
paymentCollector = await datatoken.getPaymentCollector(
|
||||
ddo.datatokens[0].address
|
||||
setPaymentCollector(
|
||||
await datatoken.getPaymentCollector(ddo.datatokens[0].address)
|
||||
)
|
||||
setPaymentCollector(paymentCollector)
|
||||
} catch (error) {
|
||||
LoggerInstance.error('[MetaFull: getInitialPaymentCollector]', error)
|
||||
}
|
||||
|
@ -47,10 +47,9 @@ export default function Edit({
|
||||
let paymentCollector
|
||||
try {
|
||||
const datatoken = new Datatoken(web3)
|
||||
paymentCollector = await datatoken.getPaymentCollector(
|
||||
asset?.datatokens[0].address
|
||||
setPaymentCollector(
|
||||
await datatoken.getPaymentCollector(ddo.datatokens[0].address)
|
||||
)
|
||||
setPaymentCollector(paymentCollector)
|
||||
} catch (error) {
|
||||
LoggerInstance.error(
|
||||
'[EditMetadata: getInitialPaymentCollector]',
|
||||
|
Loading…
Reference in New Issue
Block a user