示例#1
0
    def from_payment_csv_dict_row(row, cycle):
        rl = RewardLog(row["address"], row["type"], 0, 0)
        rl.cycle = cycle
        rl.amount = int(row["amount"])
        rl.hash = None if row["hash"] == "None" else row["hash"]
        rl.paid = PaymentStatus(int(row["paid"]))

        return rl
    def FromPaymentCSVDictRow(self, row, cycle):
        rl = RewardLog(row["address"], row["type"], 0, 0)
        rl.cycle = cycle
        rl.amount = int(row["amount"])
        rl.hash = None if row["hash"] == 'None' else row["hash"]
        rl.paid = PaymentStatus(int(row["paid"]))

        return rl
    def from_payment_csv_dict_row(row, cycle):
        reward_log = RewardLog(row["address"], row["type"], 0, 0)
        reward_log.cycle = cycle
        reward_log.adjusted_amount = int(row["amount"])
        reward_log.hash = None if row["hash"] == "None" else row["hash"]
        reward_log.paid = PaymentStatus[str(row["paid"]).upper()]
        reward_log.desc = str(row["description"])

        return reward_log
示例#4
0
    def FromPaymentCSVDictRow(self, row, cyle):
        rl = RewardLog(row["address"], row["type"], None)
        rl.cycle = cyle
        rl.amount = int(row["amount"])
        rl.hash = None if row["hash"] == 'None' else row["hash"]
        rl.balance = 0 if rl.balance == None else rl.balance
        rl.paid = PaymentStatus(int(row["paid"]))
        # rl.child = None if row["child"] == 'None' else row["child"]

        return rl