Skip to content

Commit a7e318e

Browse files
committed
Fix compile error
1 parent cdf783e commit a7e318e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

logic/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
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";
32
import { Context } from "context";
43
import * as moment from "moment";
54
import * as historyModel from "../model/history";
@@ -13,8 +12,6 @@ export async function giveCCCWithLimit(
1312
postId: string
1413
): Promise<H256> {
1514
try {
16-
const sdk = context.codechainSDK;
17-
1815
const lastTime = await historyModel.findLastRequestTime(context, to);
1916
if (lastTime !== null) {
2017
const yesterday = moment().subtract(1, "day");
@@ -25,7 +22,7 @@ export async function giveCCCWithLimit(
2522

2623
let toAddress;
2724
try {
28-
toAddress = sdk.key.classes.PlatformAddress.fromString(to);
25+
toAddress = PlatformAddress.fromString(to);
2926
} catch (err) {
3027
throw new FaucetError(ErrorCode.InvalidAddress, err);
3128
}

0 commit comments

Comments
 (0)