Skip to content

Commit

Permalink
refactor: make function name lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
fly33499 committed Oct 13, 2021
1 parent a00f0fd commit 2837192
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions sdk/FirmaDistributionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class FirmaDistributionService {
}
}

public async SetWithdrawAddress(wallet: FirmaWalletService, withdrawAddress: string, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async setWithdrawAddress(wallet: FirmaWalletService, withdrawAddress: string, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {
let txRaw = await this.getSignedTxSetWithdrawAddress(wallet, withdrawAddress, txMisc);

Expand All @@ -101,7 +101,7 @@ export class FirmaDistributionService {
}
}

public async FundCommunityPool(wallet: FirmaWalletService, amount: number, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async fundCommunityPool(wallet: FirmaWalletService, amount: number, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {
let txRaw = await this.getSignedTxFundCommunityPool(wallet, amount, txMisc);

Expand All @@ -114,7 +114,7 @@ export class FirmaDistributionService {
}
}

public async WithdrawValidatorCommission(wallet: FirmaWalletService, validatorAddres: string, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async withdrawValidatorCommission(wallet: FirmaWalletService, validatorAddres: string, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {
let txRaw = await this.getSignedTxWithdrawValidatorCommission(wallet, validatorAddres, txMisc);

Expand Down
6 changes: 3 additions & 3 deletions sdk/FirmaFeeGrantService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class FirmaFeeGrantService {
}
}

public async RevokeAllowance(wallet: FirmaWalletService, granteeAddress: string, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async revokeAllowance(wallet: FirmaWalletService, granteeAddress: string, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {

try {
let txRaw = await this.getSignedTxRevokeAllowance(wallet, granteeAddress, txMisc);
Expand Down Expand Up @@ -116,7 +116,7 @@ export class FirmaFeeGrantService {
}
}

public async GrantPeriodicAllowance(wallet: FirmaWalletService, granteeAddress: string, feegrantOption: PeriodicFeeGrantOption, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async grantPeriodicAllowance(wallet: FirmaWalletService, granteeAddress: string, feegrantOption: PeriodicFeeGrantOption, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {

try {
let txRaw = await this.getSignedTxGrantPeriodicAllowance(wallet, granteeAddress, feegrantOption, txMisc);
Expand All @@ -131,7 +131,7 @@ export class FirmaFeeGrantService {
}


public async GrantBasicAllowance(wallet: FirmaWalletService, granteeAddress: string, feegrantOption: BasicFeeGrantOption = DefaultBasicFeeGrantOption, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async grantBasicAllowance(wallet: FirmaWalletService, granteeAddress: string, feegrantOption: BasicFeeGrantOption = DefaultBasicFeeGrantOption, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {
let txRaw = await this.getSignedTxGrantBasicAllowance(wallet, granteeAddress, feegrantOption, txMisc);

Expand Down
14 changes: 7 additions & 7 deletions sdk/FirmaGovService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class FirmaGovService {
}
}

public async SubmitSoftwareUpgradeProposalByHeight(wallet: FirmaWalletService, title: string, description: string, initialDeposit: number, proposer: string, upgradeName: string, height: Long, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async submitSoftwareUpgradeProposalByHeight(wallet: FirmaWalletService, title: string, description: string, initialDeposit: number, proposer: string, upgradeName: string, height: Long, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {
let plan = {
name: upgradeName,
Expand All @@ -158,7 +158,7 @@ export class FirmaGovService {
}
}

public async SubmitSoftwareUpgradeProposalByTime(wallet: FirmaWalletService, title: string, description: string, initialDeposit: number, proposer: string, upgradeName: string, upgradeTime: Date, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async submitSoftwareUpgradeProposalByTime(wallet: FirmaWalletService, title: string, description: string, initialDeposit: number, proposer: string, upgradeName: string, upgradeTime: Date, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {
let plan = {
name: upgradeName,
Expand All @@ -180,7 +180,7 @@ export class FirmaGovService {
}


public async SubmitParameterChangeProposal(wallet: FirmaWalletService, title: string, description: string, initialDeposit: number, proposer: string, paramList: ParamChangeOption[], txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async submitParameterChangeProposal(wallet: FirmaWalletService, title: string, description: string, initialDeposit: number, proposer: string, paramList: ParamChangeOption[], txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {

let txRaw = await this.getSignedTxParameterChangeProposal(wallet, title, description, initialDeposit, proposer, paramList, txMisc);
Expand All @@ -194,7 +194,7 @@ export class FirmaGovService {
}
}

public async SubmitCommunityPoolSpendProposal(wallet: FirmaWalletService, title: string, description: string, initialDeposit: number, proposer: string, amount: number, recipient: string, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async submitCommunityPoolSpendProposal(wallet: FirmaWalletService, title: string, description: string, initialDeposit: number, proposer: string, amount: number, recipient: string, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {

let txRaw = await this.getSignedTxCommunityPoolSpendProposal(wallet, title, description, initialDeposit, proposer, amount, recipient, txMisc);
Expand All @@ -209,7 +209,7 @@ export class FirmaGovService {
}


public async SubmitTextProposal(wallet: FirmaWalletService, title: string, description: string, initialDeposit: number, proposer: string, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async submitTextProposal(wallet: FirmaWalletService, title: string, description: string, initialDeposit: number, proposer: string, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {

let txRaw = await this.getSignedTxSubmitTextProposal(wallet, title, description, initialDeposit, proposer, txMisc);
Expand Down Expand Up @@ -238,7 +238,7 @@ export class FirmaGovService {
}
}

public async Vote(wallet: FirmaWalletService, proposalId: Long, option: VotingOption, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async vote(wallet: FirmaWalletService, proposalId: Long, option: VotingOption, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {

let txRaw = await this.getSignedTxVote(wallet, proposalId, option, txMisc);
Expand Down Expand Up @@ -270,7 +270,7 @@ export class FirmaGovService {
}
}

public async Deposit(wallet: FirmaWalletService, proposalId: Long, amount: number, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
public async deposit(wallet: FirmaWalletService, proposalId: Long, amount: number, txMisc: TxMisc = DefaultTxMisc): Promise<BroadcastTxResponse> {
try {
let txRaw = await this.getSignedTxDeposit(wallet, proposalId, amount, txMisc);

Expand Down
8 changes: 4 additions & 4 deletions test/06.feegrant_tx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('[06. Feegrant Tx Test]', () => {
periodReset: expirationDate
};

var result = await firma.FeeGrant.GrantPeriodicAllowance(aliceWallet, await bobWallet.getAddress(), periodicAllowanceData);
var result = await firma.FeeGrant.grantPeriodicAllowance(aliceWallet, await bobWallet.getAddress(), periodicAllowanceData);

expect(result.code).to.equal(0);
});
Expand All @@ -34,7 +34,7 @@ describe('[06. Feegrant Tx Test]', () => {
const alicewallet = await firma.Wallet.fromMnemonic(aliceMnemonic);
const bobWallet = await firma.Wallet.fromMnemonic(bobMnemonic);

var result = await firma.FeeGrant.RevokeAllowance(alicewallet, await bobWallet.getAddress());
var result = await firma.FeeGrant.revokeAllowance(alicewallet, await bobWallet.getAddress());
//console.log(result);

expect(result.code).to.equal(0);
Expand All @@ -54,7 +54,7 @@ describe('[06. Feegrant Tx Test]', () => {
//var result = await firma.FeeGrant.GrantBasicAllowance(aliceWallet, await bobWallet.getAddress(), {spendLimit : spendLimit, expiration : expirationDate});
//var result = await firma.FeeGrant.GrantBasicAllowance(aliceWallet, await bobWallet.getAddress(), {expiration : expirationDate});
//var result = await firma.FeeGrant.GrantBasicAllowance(aliceWallet, await bobWallet.getAddress(), {spendLimit : spendLimit});
var result = await firma.FeeGrant.GrantBasicAllowance(aliceWallet, await bobWallet.getAddress());
var result = await firma.FeeGrant.grantBasicAllowance(aliceWallet, await bobWallet.getAddress());

expect(result.code).to.equal(0);
});
Expand All @@ -77,7 +77,7 @@ describe('[06. Feegrant Tx Test]', () => {
const alicewallet = await firma.Wallet.fromMnemonic(aliceMnemonic);
const bobWallet = await firma.Wallet.fromMnemonic(bobMnemonic);

var result = await firma.FeeGrant.RevokeAllowance(alicewallet, await bobWallet.getAddress());
var result = await firma.FeeGrant.revokeAllowance(alicewallet, await bobWallet.getAddress());
//console.log(result);

expect(result.code).to.equal(0);
Expand Down
6 changes: 3 additions & 3 deletions test/14.distribution_tx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('[14. Distribution Tx Test]', () => {
const validatorList = await firma.Staking.getValidatorList();
const validatorAddress = validatorList[0].operator_address;

var result = await firma.Distribution.WithdrawValidatorCommission(wallet, validatorAddress);
var result = await firma.Distribution.withdrawValidatorCommission(wallet, validatorAddress);

//console.log(result);

Expand All @@ -42,7 +42,7 @@ describe('[14. Distribution Tx Test]', () => {
const wallet = await firma.Wallet.fromMnemonic(validatorMnemonic);
const amount = 1;

var result = await firma.Distribution.FundCommunityPool(wallet, amount);
var result = await firma.Distribution.fundCommunityPool(wallet, amount);
expect(result.code).to.equal(0);
});

Expand All @@ -53,7 +53,7 @@ describe('[14. Distribution Tx Test]', () => {
const validatorWallet = await firma.Wallet.fromMnemonic(validatorMnemonic);
const aliceWallet = await firma.Wallet.fromMnemonic(aliceMnemonic);

var result = await firma.Distribution.SetWithdrawAddress(validatorWallet, await aliceWallet.getAddress());
var result = await firma.Distribution.setWithdrawAddress(validatorWallet, await aliceWallet.getAddress());
expect(result.code).to.equal(0);
});
});
14 changes: 7 additions & 7 deletions test/16.gov_tx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe.skip('[16. Gov Tx Test]', () => {
const title = "test submit proposal";
const description = "test description";

var result = await firma.Gov.SubmitTextProposal(wallet, title, description, initialDepositFCT, proposer);
var result = await firma.Gov.submitTextProposal(wallet, title, description, initialDepositFCT, proposer);

console.log(result);
expect(result.code).to.equal(0);
Expand All @@ -42,7 +42,7 @@ describe.skip('[16. Gov Tx Test]', () => {
const amount = 1000;
const recipient = await bobWallet.getAddress();

var result = await firma.Gov.SubmitCommunityPoolSpendProposal(aliceWallet, title, description, initialDepositFCT, proposer, amount, recipient);
var result = await firma.Gov.submitCommunityPoolSpendProposal(aliceWallet, title, description, initialDepositFCT, proposer, amount, recipient);

console.log(result);
expect(result.code).to.equal(0);
Expand All @@ -63,7 +63,7 @@ describe.skip('[16. Gov Tx Test]', () => {
value: "100",
}];

var result = await firma.Gov.SubmitParameterChangeProposal(aliceWallet, title, description, initialDepositFCT, proposer, changeParamList);
var result = await firma.Gov.submitParameterChangeProposal(aliceWallet, title, description, initialDepositFCT, proposer, changeParamList);

console.log(result);
expect(result.code).to.equal(0);
Expand All @@ -81,7 +81,7 @@ describe.skip('[16. Gov Tx Test]', () => {
const upgradeName = "v0.2.7";
const upgradeHeight = Long.fromInt(20000000);

var result = await firma.Gov.SubmitSoftwareUpgradeProposalByHeight(aliceWallet, title, description, initialDepositFCT, proposer, upgradeName, upgradeHeight);
var result = await firma.Gov.submitSoftwareUpgradeProposalByHeight(aliceWallet, title, description, initialDepositFCT, proposer, upgradeName, upgradeHeight);

//console.log(result);
expect(result.code).to.equal(0);
Expand Down Expand Up @@ -122,7 +122,7 @@ describe.skip('[16. Gov Tx Test]', () => {

const proposalId = Long.fromInt(tempProposalId);
const amount = 1000;
var result = await firma.Gov.Deposit(wallet, proposalId, amount);
var result = await firma.Gov.deposit(wallet, proposalId, amount);
//console.log(result);
expect(result.code).to.equal(0);
});
Expand All @@ -132,7 +132,7 @@ describe.skip('[16. Gov Tx Test]', () => {
const wallet = await firma.Wallet.fromMnemonic(aliceMnemonic);
const proposalId = Long.fromInt(tempProposalId);

var result = await firma.Gov.Vote(wallet, proposalId, VotingOption.VOTE_OPTION_YES);
var result = await firma.Gov.vote(wallet, proposalId, VotingOption.VOTE_OPTION_YES);
//console.log(result);
expect(result.code).to.equal(0);
});
Expand All @@ -142,7 +142,7 @@ describe.skip('[16. Gov Tx Test]', () => {
const wallet = await firma.Wallet.fromMnemonic(bobMnemonic);
const proposalId = Long.fromInt(tempProposalId);

var result = await firma.Gov.Vote(wallet, proposalId, VotingOption.VOTE_OPTION_NO);
var result = await firma.Gov.vote(wallet, proposalId, VotingOption.VOTE_OPTION_NO);
//console.log(result);
expect(result.code).to.equal(0);
});
Expand Down

0 comments on commit 2837192

Please sign in to comment.