File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1
- import { H256 , U256 } from "codechain-sdk/lib/core/classes" ;
2
- import { PlatformAddress } from "codechain-sdk/lib/key/classes" ;
1
+ import { H256 , PlatformAddress , U256 } from "codechain-sdk/lib/core/classes" ;
3
2
import { Context } from "context" ;
4
3
import * as moment from "moment" ;
5
4
import * as historyModel from "../model/history" ;
@@ -13,8 +12,6 @@ export async function giveCCCWithLimit(
13
12
postId : string
14
13
) : Promise < H256 > {
15
14
try {
16
- const sdk = context . codechainSDK ;
17
-
18
15
const lastTime = await historyModel . findLastRequestTime ( context , to ) ;
19
16
if ( lastTime !== null ) {
20
17
const yesterday = moment ( ) . subtract ( 1 , "day" ) ;
@@ -25,7 +22,7 @@ export async function giveCCCWithLimit(
25
22
26
23
let toAddress ;
27
24
try {
28
- toAddress = sdk . key . classes . PlatformAddress . fromString ( to ) ;
25
+ toAddress = PlatformAddress . fromString ( to ) ;
29
26
} catch ( err ) {
30
27
throw new FaucetError ( ErrorCode . InvalidAddress , err ) ;
31
28
}
You can’t perform that action at this time.
0 commit comments