|
|
@ -52,6 +52,13 @@ class AppExtension extends AbstractExtension |
|
|
|
'formatKVA' |
|
|
|
'formatKVA' |
|
|
|
] |
|
|
|
] |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
new TwigFilter( |
|
|
|
|
|
|
|
'account_balance', |
|
|
|
|
|
|
|
[ |
|
|
|
|
|
|
|
$this, |
|
|
|
|
|
|
|
'accountBalance' |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
), |
|
|
|
new TwigFilter( |
|
|
|
new TwigFilter( |
|
|
|
'message_to_markdown', |
|
|
|
'message_to_markdown', |
|
|
|
[ |
|
|
|
[ |
|
|
@ -270,6 +277,24 @@ class AppExtension extends AbstractExtension |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function accountBalance( |
|
|
|
|
|
|
|
string $account |
|
|
|
|
|
|
|
): ?float |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// Connect kevacoin |
|
|
|
|
|
|
|
$client = new \Kevachat\Kevacoin\Client( |
|
|
|
|
|
|
|
$this->container->getParameter('app.kevacoin.protocol'), |
|
|
|
|
|
|
|
$this->container->getParameter('app.kevacoin.host'), |
|
|
|
|
|
|
|
$this->container->getParameter('app.kevacoin.port'), |
|
|
|
|
|
|
|
$this->container->getParameter('app.kevacoin.username'), |
|
|
|
|
|
|
|
$this->container->getParameter('app.kevacoin.password') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $client->getAccountAddress( |
|
|
|
|
|
|
|
$account |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function messageToMarkdown( |
|
|
|
public function messageToMarkdown( |
|
|
|
string $text |
|
|
|
string $text |
|
|
|
): string |
|
|
|
): string |
|
|
|