I am trying to create an asset trading only with WAVES, and I have created an smart asset on Waves testnet using RIDE language, but now, I can't trade this asset with WAVES, thanks!
let WavesId = base58'WAVES'
match tx {
case t : ExchangeTransaction =>
t.sellOrder.assetPair.priceAsset == WavesId || t.sellOrder.assetPair.amountAsset == WavesId
case _ => true
}
This is the error message:
For defined trading, you need to determine if Smart asset is paired with Waves like the following:
let withWaves = (!isDefined(e.sellOrder.assetPair.priceAsset) || !isDefined(e.sellOrder.assetPair.amountAsset))
Instead of t.sellOrder.assetPair.priceAsset == WavesId || t.sellOrder.assetPair.amountAsset == WavesId