(transaction: Dict, currency: Currency = undefined)
| 6655 | } |
| 6656 | |
| 6657 | parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction { |
| 6658 | // |
| 6659 | // fetchDeposits |
| 6660 | // |
| 6661 | // { |
| 6662 | // "id": "75115912", |
| 6663 | // "type": "deposit", |
| 6664 | // "sub-type": "NORMAL", |
| 6665 | // "request-id": "trc20usdt-a2e229a44ef2a948c874366230bb56aa73631cc0a03d177bd8b4c9d38262d7ff-200", |
| 6666 | // "currency": "usdt", |
| 6667 | // "chain": "trc20usdt", |
| 6668 | // "tx-hash": "a2e229a44ef2a948c874366230bb56aa73631cc0a03d177bd8b4c9d38262d7ff", |
| 6669 | // "amount": "2849.000000000000000000", |
| 6670 | // "from-addr-tag": "", |
| 6671 | // "address-id": "0", |
| 6672 | // "address": "TRFTd1FxepQE6CnpwzUEMEbFaLm5bJK67s", |
| 6673 | // "address-tag": "", |
| 6674 | // "fee": "0", |
| 6675 | // "state": "safe", |
| 6676 | // "wallet-confirm": "2", |
| 6677 | // "created-at": "1621843808662", |
| 6678 | // "updated-at": "1621843857137" |
| 6679 | // }, |
| 6680 | // |
| 6681 | // fetchWithdrawals |
| 6682 | // |
| 6683 | // { |
| 6684 | // "id": "61335312", |
| 6685 | // "type": "withdraw", |
| 6686 | // "sub-type": "NORMAL", |
| 6687 | // "currency": "usdt", |
| 6688 | // "chain": "trc20usdt", |
| 6689 | // "tx-hash": "30a3111f2fead74fae45c6218ca3150fc33cab2aa59cfe41526b96aae79ce4ec", |
| 6690 | // "amount": "12.000000000000000000", |
| 6691 | // "from-addr-tag": "", |
| 6692 | // "address-id": "27321591", |
| 6693 | // "address": "TRf5JacJQRsF4Nm2zu11W6maDGeiEWQu9e", |
| 6694 | // "address-tag": "", |
| 6695 | // "fee": "1.000000000000000000", |
| 6696 | // "state": "confirmed", |
| 6697 | // "created-at": "1621852316553", |
| 6698 | // "updated-at": "1621852467041" |
| 6699 | // } |
| 6700 | // |
| 6701 | // withdraw |
| 6702 | // |
| 6703 | // { |
| 6704 | // "status": "ok", |
| 6705 | // "data": "99562054" |
| 6706 | // } |
| 6707 | // |
| 6708 | const timestamp = this.safeInteger (transaction, 'created-at'); |
| 6709 | const code = this.safeCurrencyCode (this.safeString (transaction, 'currency')); |
| 6710 | let type = this.safeString (transaction, 'type'); |
| 6711 | if (type === 'withdraw') { |
| 6712 | type = 'withdrawal'; |
| 6713 | } |
| 6714 | let feeCost = this.safeString (transaction, 'fee'); |
no test coverage detected