How to close liquidity account?
Closing account allowed for 0 balances
import { SwapActionGenerator } from "@a-dex/a-dex-sdk";
const actionsGen = new SwapActionGenerator("swap.adex");
const action = await actionsGen.close(
[
{
actor: "trader.adex",
permission: "active",
},
],
"trader.adex",
"0,LPA"
);
cleos -u https://eos.greymass.com push transaction '{
"delay_sec": 0,
"max_cpu_usage_ms": 0,
"actions": [
{
"account": "swap.adex",
"name": "close",
"data": {
"owner": "trader.adex",
"symbol": "0,LPA"
},
"authorization": [
{
"actor": "trader.adex",
"permission": "active"
}
]
}
]
}'
const result = await api.transact({
actions: [{
account: 'swap.adex',
name: 'close',
authorization: [{
actor: 'trader.adex',
permission: 'active',
}],
data: {
owner: 'trader.adex',
symbol: '0,LPA'
},
}]
}, {
blocksBehind: 3,
expireSeconds: 30,
});
Last updated