Skip to content

Commit

Permalink
fix: 🐛 endorsement service
Browse files Browse the repository at this point in the history
  • Loading branch information
SmilingXinyi committed Feb 22, 2021
1 parent a276818 commit c4303b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class XuperSDK implements XuperSDKInterface {
}

if (this.plugins.length > 0) {
this.plugins.every(plugin => plugin.init && plugin.init(plugin.args))
this.plugins.every(plugin => plugin.init && plugin.init(plugin.args, this.options));
}
}

Expand Down Expand Up @@ -362,8 +362,6 @@ export default class XuperSDK implements XuperSDKInterface {
}
}

console.warn(authRequires)

let totalNeed = new BN(0);
Object.keys(authRequires).forEach((key: string) => {
const auth = authRequires[key];
Expand Down
8 changes: 5 additions & 3 deletions src/plugins/endorsement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
* Created by baidu on 2020/7/14
*/

import {UTXO, TXOutput, TransactionModel, AuthModel, AccountModel} from '../types';
import {UTXO, TXOutput, TransactionModel, AuthModel, AccountModel, Options} from '../types';
import * as Requests from '../requests';
import {convert} from '../utils';

const plugin = (args: any) => ({
name: 'Compliance',
init: function(defaultArgs: any) {
Requests.initializationEndorseClient(defaultArgs.transfer.server);
init: function(defaultArgs: any, sdkOptions: Options) {
if (!sdkOptions.env?.node?.disableGRPC) {
Requests.initializationEndorseClient(defaultArgs.transfer.server);
}
},
func: {
makeTransaction: async function(defaultArgs: any, account: AccountModel, ti: TransactionModel, authRequires: AuthModel[], preExecWithUtxosObj: any) {
Expand Down

0 comments on commit c4303b6

Please sign in to comment.