initialize_accounting() bugfix
This commit is contained in:
@@ -11,6 +11,7 @@ from dexorder import db, dec, NATIVE_TOKEN, from_timestamp, config, ADDRESS_0, n
|
||||
from dexorder.base import TransactionReceiptDict
|
||||
from dexorder.base.chain import current_chain
|
||||
from dexorder.blocks import get_block_timestamp, get_block, current_block
|
||||
from dexorder.contract import ContractProxy
|
||||
from dexorder.contract.dexorder import get_factory_contract, get_mirrorenv, get_mockenv
|
||||
from dexorder.database.model.accounting import AccountingSubcategory, Accounting, AccountingCategory, AccountKind, \
|
||||
DbAccount, Reconciliation
|
||||
@@ -110,8 +111,8 @@ async def _initialize_mark_to_market():
|
||||
config.nativecoin = weth if weth is not None else meh if meh is not None else None
|
||||
elif not config.nativecoin:
|
||||
factory = get_factory_contract()
|
||||
impl = await factory.implementation()
|
||||
wrapper = await impl.wrapper()
|
||||
impl_addr = await factory.implementation()
|
||||
wrapper = await ContractProxy(impl_addr, 'Vault').wrapper()
|
||||
if wrapper != ADDRESS_0:
|
||||
config.nativecoin = wrapper
|
||||
quotes.clear()
|
||||
|
||||
Reference in New Issue
Block a user