mirror of
https://github.com/kevachat/webapp.git
synced 2025-02-02 01:44:27 +00:00
update option namespaces
This commit is contained in:
parent
e2faa16ffd
commit
1c4930be38
15
.env
15
.env
@ -39,14 +39,20 @@ APP_KEVACOIN_PORT=9992
|
||||
APP_KEVACOIN_USERNAME=EDIT_ME
|
||||
APP_KEVACOIN_PASSWORD=EDIT_ME
|
||||
|
||||
# Separated profit account (KevaCoin wallet)
|
||||
APP_KEVACOIN_PROFIT_ACCOUNT=PROFIT
|
||||
|
||||
# Address to receive KevaCoin donations
|
||||
APP_KEVACOIN_PROFIT_ADDRESS=EDIT_ME
|
||||
|
||||
# KevaCoin address to withdraw instance profit (empty to disable)
|
||||
APP_KEVACOIN_WITHDRAW_PROFIT_ADDRESS=
|
||||
APP_KEVACOIN_PROFIT_WITHDRAW_ADDRESS=
|
||||
|
||||
# Keep at least n KVA on balance (for app transactions)
|
||||
APP_KEVACOIN_WITHDRAW_BALANCE_MIN_KVA=1
|
||||
APP_KEVACOIN_PROFIT_WITHDRAW_BALANCE_MIN_KVA=1
|
||||
|
||||
# Withdraw funds starting from (do not keep amount greater this value)
|
||||
APP_KEVACOIN_WITHDRAW_BALANCE_MAX_KVA=10
|
||||
APP_KEVACOIN_PROFIT_WITHDRAW_BALANCE_MAX_KVA=10
|
||||
|
||||
# Share with other some mining pool to get free coins
|
||||
APP_KEVACOIN_MINE_POOL_URL=https://miningpoolstats.stream/kevacoin
|
||||
@ -55,9 +61,6 @@ APP_KEVACOIN_MINE_SOLO_URL=https://kevacoin.org/tutorial_solo_mining.html
|
||||
# Explorer URL
|
||||
APP_KEVACOIN_EXPLORER_URL=https://keva.one/explorer/address/
|
||||
|
||||
# Address to receive kevacoin donations (make others able to fill node balance)
|
||||
APP_KEVACOIN_BOOST_ADDRESS=EDIT_ME
|
||||
|
||||
# Pinned room namespaces, separated with |
|
||||
APP_KEVACOIN_ROOM_NAMESPACES_PINNED=EDIT_ME
|
||||
|
||||
|
@ -15,13 +15,14 @@ parameters:
|
||||
app.kevacoin.port: '%env(APP_KEVACOIN_PORT)%'
|
||||
app.kevacoin.username: '%env(APP_KEVACOIN_USERNAME)%'
|
||||
app.kevacoin.password: '%env(APP_KEVACOIN_PASSWORD)%'
|
||||
app.kevacoin.withdraw.profit.address: '%env(APP_KEVACOIN_WITHDRAW_PROFIT_ADDRESS)%'
|
||||
app.kevacoin.withdraw.balance.min.kva: '%env(APP_KEVACOIN_WITHDRAW_BALANCE_MIN_KVA)%'
|
||||
app.kevacoin.withdraw.balance.max.kva: '%env(APP_KEVACOIN_WITHDRAW_BALANCE_MAX_KVA)%'
|
||||
app.kevacoin.profit.account: '%env(APP_KEVACOIN_PROFIT_ACCOUNT)%'
|
||||
app.kevacoin.profit.address: '%env(APP_KEVACOIN_PROFIT_ADDRESS)%'
|
||||
app.kevacoin.profit.withdraw.address: '%env(APP_KEVACOIN_PROFIT_WITHDRAW_ADDRESS)%'
|
||||
app.kevacoin.profit.withdraw.balance.min.kva: '%env(APP_KEVACOIN_PROFIT_WITHDRAW_BALANCE_MIN_KVA)%'
|
||||
app.kevacoin.profit.withdraw.balance.max.kva: '%env(APP_KEVACOIN_PROFIT_WITHDRAW_BALANCE_MAX_KVA)%'
|
||||
app.kevacoin.room.namespaces.pinned: '%env(APP_KEVACOIN_ROOM_NAMESPACES_PINNED)%'
|
||||
app.kevacoin.room.namespaces.readonly: '%env(APP_KEVACOIN_ROOM_NAMESPACES_READONLY)%'
|
||||
app.kevacoin.room.namespace.default: '%env(APP_KEVACOIN_ROOM_NAMESPACE_DEFAULT)%'
|
||||
app.kevacoin.boost.address: '%env(APP_KEVACOIN_BOOST_ADDRESS)%'
|
||||
app.kevacoin.explorer.url: '%env(APP_KEVACOIN_EXPLORER_URL)%'
|
||||
app.kevacoin.mine.pool.url: '%env(APP_KEVACOIN_MINE_POOL_URL)%'
|
||||
app.kevacoin.mine.solo.url: '%env(APP_KEVACOIN_MINE_SOLO_URL)%'
|
||||
|
@ -159,16 +159,16 @@ class CrontabController extends AbstractController
|
||||
);
|
||||
|
||||
// Withdraw profit
|
||||
if ($this->getParameter('app.kevacoin.withdraw.profit.address'))
|
||||
if ($this->getParameter('app.kevacoin.profit.withdraw.address'))
|
||||
{
|
||||
if ($balance = $client->getBalance())
|
||||
{
|
||||
if ($balance - $this->getParameter('app.kevacoin.withdraw.balance.min.kva') >= $this->getParameter('app.kevacoin.withdraw.balance.max.kva'))
|
||||
if ($balance - $this->getParameter('app.kevacoin.profit.withdraw.balance.min.kva') >= $this->getParameter('app.kevacoin.profit.withdraw.balance.max.kva'))
|
||||
{
|
||||
$client->sendToAddress(
|
||||
$this->getParameter('app.kevacoin.withdraw.profit.address'),
|
||||
$this->getParameter('app.kevacoin.profit.withdraw.address'),
|
||||
round(
|
||||
$balance - $this->getParameter('app.kevacoin.withdraw.balance.min.kva'),
|
||||
$balance - $this->getParameter('app.kevacoin.profit.withdraw.balance.min.kva'),
|
||||
8
|
||||
),
|
||||
'crontab/withdraw',
|
||||
|
@ -73,7 +73,7 @@ class ModuleController extends AbstractController
|
||||
],
|
||||
'boost' =>
|
||||
[
|
||||
'address' => $this->getParameter('app.kevacoin.boost.address')
|
||||
'address' => $this->getParameter('app.kevacoin.profit.address')
|
||||
],
|
||||
'mine' =>
|
||||
[
|
||||
|
@ -597,10 +597,7 @@ class RoomController extends AbstractController
|
||||
'namespace' => $request->get('namespace'),
|
||||
'message' => $request->get('message'),
|
||||
'sign' => $request->get('sign'),
|
||||
'error' => sprintf(
|
||||
$translator->trans('Insufficient funds, wallet: %s'),
|
||||
$this->getParameter('app.kevacoin.boost.address')
|
||||
),
|
||||
'error' => $translator->trans('Insufficient funds'),
|
||||
'_fragment' => 'latest'
|
||||
]
|
||||
);
|
||||
@ -956,10 +953,7 @@ class RoomController extends AbstractController
|
||||
[
|
||||
'mode' => $request->get('mode'),
|
||||
'name' => $name,
|
||||
'error' => sprintf(
|
||||
$translator->trans('Insufficient funds, wallet: %s'),
|
||||
$this->getParameter('app.kevacoin.boost.address')
|
||||
)
|
||||
'error' => $translator->trans('Insufficient funds')
|
||||
]
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user