1
This commit is contained in:
parent
aa9013ab55
commit
c98be0a1d5
@ -5,12 +5,14 @@ const app = require('j7/app');
|
||||
const utils = require('j7/utils');
|
||||
const bcutils = require('j7/bcutils');
|
||||
const metaFactory = require('../metadata/factory');
|
||||
const serviceFactory = require('../services/factory');
|
||||
|
||||
async function claim(session) {
|
||||
try {
|
||||
const account = session.request('account');
|
||||
const netId = session.request('net_id');
|
||||
const bc = null;
|
||||
const bc = serviceFactory.create('BlockChain');
|
||||
await bc.init(netId);
|
||||
|
||||
const nftAddress = bc.getNftAddress(bcutils.CLAIM_BOX_TYPE);
|
||||
|
||||
|
@ -25,7 +25,7 @@ async function init() {
|
||||
await add("BlockChain", 'blockchain');
|
||||
}
|
||||
|
||||
function create(name, session) {
|
||||
function create(name, session = null) {
|
||||
const service = services[name];
|
||||
return new service['class'](session);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user