Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kin/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from . import errors as KinErrors
from .transactions import build_memo
from .blockchain.errors import TransactionResultCode, HorizonErrorType, HorizonError
from .config import SDK_USER_AGENT, APP_ID_REGEX
from .config import SDK_USER_AGENT, APP_ID_REGEX, KIN_DECIMAL_PRECISION
from .blockchain.utils import is_valid_address, is_valid_secret_key

import logging
Expand Down Expand Up @@ -337,7 +337,7 @@ def _top_up(self, address):
# TODO: let user config the amount of kin to top up
min_fee = self._client.get_minimum_fee()
builder = self.get_transaction_builder(min_fee)
builder.append_payment_op(address, str(min_fee * 1000))
builder.append_payment_op(address, str((min_fee / KIN_DECIMAL_PRECISION) * 1000)) # Enough for 1K txs
builder.update_sequence()
builder.sign()
builder.submit()
1 change: 1 addition & 0 deletions kin/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the config for the Kin SDK"""
from kin_base.operation import ONE as KIN_DECIMAL_PRECISION

from .blockchain.environment import Environment

Expand Down