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(() => {
|
useEffect(() => {
|
||||||
async function getInitialPaymentCollector() {
|
async function getInitialPaymentCollector() {
|
||||||
let paymentCollector
|
|
||||||
try {
|
try {
|
||||||
const datatoken = new Datatoken(web3)
|
const datatoken = new Datatoken(web3)
|
||||||
paymentCollector = await datatoken.getPaymentCollector(
|
setPaymentCollector(
|
||||||
ddo.datatokens[0].address
|
await datatoken.getPaymentCollector(ddo.datatokens[0].address)
|
||||||
)
|
)
|
||||||
setPaymentCollector(paymentCollector)
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
LoggerInstance.error('[MetaFull: getInitialPaymentCollector]', error)
|
LoggerInstance.error('[MetaFull: getInitialPaymentCollector]', error)
|
||||||
}
|
}
|
||||||
|
@ -47,10 +47,9 @@ export default function Edit({
|
|||||||
let paymentCollector
|
let paymentCollector
|
||||||
try {
|
try {
|
||||||
const datatoken = new Datatoken(web3)
|
const datatoken = new Datatoken(web3)
|
||||||
paymentCollector = await datatoken.getPaymentCollector(
|
setPaymentCollector(
|
||||||
asset?.datatokens[0].address
|
await datatoken.getPaymentCollector(ddo.datatokens[0].address)
|
||||||
)
|
)
|
||||||
setPaymentCollector(paymentCollector)
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
LoggerInstance.error(
|
LoggerInstance.error(
|
||||||
'[EditMetadata: getInitialPaymentCollector]',
|
'[EditMetadata: getInitialPaymentCollector]',
|
||||||
|
Loading…
Reference in New Issue
Block a user