Commit 596f377 1 parent f48b4fc commit 596f377 Copy full SHA for 596f377
File tree 2 files changed +5
-3
lines changed
chainrelay/eth/backing/src
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,8 @@ decl_module! {
226
226
227
227
<MomentT <T >>:: saturated_from( Moment :: try_from( month) ? as _)
228
228
} ;
229
- // TODO: Check the time unit in seconds or milliseconds
229
+ // https://github.com/evolutionlandorg/bank/blob/master/contracts/GringottsBankV2.sol#L178
230
+ // The start_at here is in seconds, will be converted to milliseconds later in on_deposit_redeem
230
231
let start_at = {
231
232
let start_at = result
232
233
. params[ 3 ]
@@ -238,7 +239,8 @@ decl_module! {
238
239
<MomentT <T >>:: saturated_from( Moment :: try_from( start_at) ? as _)
239
240
} ;
240
241
let redeemed_ring = {
241
- // TODO: div 10**18 and mul 10**9
242
+ // The decimal in Ethereum is 10**18, and the decimal in Darwinia is 10**9,
243
+ // div 10**18 and mul 10**9
242
244
let amount = result. params[ 5 ]
243
245
. value
244
246
. clone( )
Original file line number Diff line number Diff line change @@ -2383,7 +2383,7 @@ impl<T: Trait> OnDepositRedeem<T::AccountId> for Module<T> {
2383
2383
let controller = Self :: bonded ( & stash) . ok_or ( <Error < T > >:: NotStash ) ?;
2384
2384
let ledger = Self :: ledger ( & controller) . ok_or ( <Error < T > >:: NotController ) ?;
2385
2385
2386
- // TODO: Issue #169, checking the timestamp unit difference between Ethereum and Darwinia
2386
+ // The timestamp unit is different between Ethereum and Darwinia, converting from seconds to milliseconds
2387
2387
let start_time = start_time * 1000 ;
2388
2388
let promise_month = months. min ( 36 ) ;
2389
2389
You can’t perform that action at this time.
0 commit comments