Skip to content

Commit

Permalink
Add polygon chain to Owna (#9328)
Browse files Browse the repository at this point in the history
* Adding polygon mainnet to Owna

* fix network name

* update backend subdomain depending on chain id
  • Loading branch information
0xRoch authored Mar 13, 2024
1 parent 97c14c1 commit ac7ef03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion projects/owna/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const ADDRESSES = require('../helper/coreAssets.json')

module.exports = {
chains: [
{
Expand All @@ -9,5 +10,13 @@ module.exports = {
nftContract: '0xa0db7ef54eeffb7a3a5d9e7a95fb853392573b90',
lendingContract: '0x27Ca3D6c64398FF9BcF2E66896EC4B3BEc5e1959',
},
{
name: 'polygon',
tokens: [
ADDRESSES.polygon.USDC,
],
nftContract: '0x666E30E3cdB0A920deA6Cd52E6d1cF0C344CC218',
lendingContract: '0x514F4FC7A3F5CF4c8bD14957C19997b42269c9Ce',
},
]
}
}
3 changes: 2 additions & 1 deletion projects/owna/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ config.chains.forEach(async chainInfo => {
}

async function getOffersCount(tokenId) {
return parseInt(await get('https://backend.owna.io/offer/getOffersCount?mintId=' + tokenId));
const backendUrl = chain === 'polygon' ? 'https://polygon-backend.owna.io' : 'https://backend.owna.io';
return parseInt(await get(`${backendUrl}/offer/getOffersCount?mintId=` + tokenId));
}

async function totalOffers() {
Expand Down

0 comments on commit ac7ef03

Please sign in to comment.