mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
Removing arrary from providerFee
This commit is contained in:
parent
e8d5dcf9db
commit
3dac319c0e
@ -265,7 +265,7 @@ type Order @entity {
|
||||
publishingMarket: User
|
||||
publishingMarketToken: Token #
|
||||
publishingMarketAmmount: BigDecimal #call contract to get fee amount
|
||||
providerFee: [String!]
|
||||
providerFee: String
|
||||
|
||||
consumerMarket: User
|
||||
consumerMarketToken: Token #
|
||||
|
@ -214,12 +214,7 @@ export function handleProviderFee(event: ProviderFee): void {
|
||||
}
|
||||
}`
|
||||
|
||||
let existingProviderFees: string[]
|
||||
if (!order.providerFee) existingProviderFees = []
|
||||
else existingProviderFees = order.providerFee as string[]
|
||||
existingProviderFees.push(providerFee)
|
||||
|
||||
order.providerFee = existingProviderFees
|
||||
order.providerFee = providerFee
|
||||
order.save()
|
||||
}
|
||||
|
||||
|
@ -72,16 +72,27 @@ const ddo = {
|
||||
}
|
||||
|
||||
describe('Simple Publish & consume test', async () => {
|
||||
const nft = new Nft(web3)
|
||||
const Factory = new NftFactory(addresses.ERC721Factory, web3)
|
||||
const accounts = await web3.eth.getAccounts()
|
||||
const publisherAccount = accounts[0]
|
||||
const newOwnerAccount = accounts[1].toLowerCase()
|
||||
const user1 = accounts[2]
|
||||
const user2 = accounts[3]
|
||||
const user3 = accounts[4]
|
||||
let datatokenAddress: string
|
||||
let datatoken: Datatoken
|
||||
let nft: Nft
|
||||
let Factory: NftFactory
|
||||
let accounts: string[]
|
||||
let publisherAccount: string
|
||||
let newOwnerAccount: string
|
||||
let user1: string
|
||||
let user2: string
|
||||
let user3: string
|
||||
|
||||
before(async () => {
|
||||
nft = new Nft(web3)
|
||||
Factory = new NftFactory(addresses.ERC721Factory, web3)
|
||||
accounts = await web3.eth.getAccounts()
|
||||
publisherAccount = accounts[0]
|
||||
newOwnerAccount = accounts[1].toLowerCase()
|
||||
user1 = accounts[2]
|
||||
user2 = accounts[3]
|
||||
user3 = accounts[4]
|
||||
})
|
||||
|
||||
it('should publish a dataset (create NFT + ERC20)', async () => {
|
||||
// const consumerAccount = accounts[1]
|
||||
|
Loading…
Reference in New Issue
Block a user