Skip to content

Commit

Permalink
chore: clean unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
chibie committed Jun 12, 2024
1 parent e4b6be0 commit 1948589
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 33 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
.env
.vscode
coverage
coverage.json
typechain
Expand Down
1 change: 1 addition & 0 deletions artifacts/build-info/0dbe503a07cb4d0e0edd2b1d16930510.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion artifacts/build-info/bf930775e6dd5ca8a1e27dfc6c936b1e.json

This file was deleted.

2 changes: 1 addition & 1 deletion artifacts/contracts/Gateway.sol/Gateway.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/bf930775e6dd5ca8a1e27dfc6c936b1e.json"
"buildInfo": "../../build-info/0dbe503a07cb4d0e0edd2b1d16930510.json"
}
4 changes: 2 additions & 2 deletions artifacts/contracts/Gateway.sol/Gateway.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/bf930775e6dd5ca8a1e27dfc6c936b1e.json"
"buildInfo": "../../build-info/0dbe503a07cb4d0e0edd2b1d16930510.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/bf930775e6dd5ca8a1e27dfc6c936b1e.json"
"buildInfo": "../../../build-info/0dbe503a07cb4d0e0edd2b1d16930510.json"
}
8 changes: 1 addition & 7 deletions contracts/Gateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,7 @@ contract Gateway is IGateway, GatewaySettingManager, PausableUpgradeable {
string calldata messageHash
) external whenNotPaused returns (bytes32 orderId) {
// checks that are required
_handler(
_token,
_amount,
_refundAddress,
_senderFeeRecipient,
_senderFee
);
_handler(_token, _amount, _refundAddress, _senderFeeRecipient, _senderFee);

// validate messageHash
require(bytes(messageHash).length != 0, 'InvalidMessageHash');
Expand Down
16 changes: 0 additions & 16 deletions contracts/interfaces/IGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,6 @@ interface IGateway {
/* ##################################################################
STRUCTS
################################################################## */
/**
* @dev Struct representing transaction metadata.
* @param identifier The identifier of the transaction.
* @param institution The institution of the transaction.
* @param name The name of the transaction.
* @param currency The currency of the transaction.
* @param liquidityProviderID The ID of the liquidity provider.
*/
struct TransactionMetadata {
bytes8 identifier;
bytes8 institution;
bytes8 name;
bytes8 currency;
uint256 liquidityProviderID;
}

/**
* @dev Struct representing an order.
* @param sender The address of the sender.
Expand Down
2 changes: 1 addition & 1 deletion scripts/tron/setSupportedTokens.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BigNumber } from "@ethersproject/bignumber";
import { getTronContracts } from "../utils";
import { CURRENCIES, INSTITUTIONS, NETWORKS } from "../config";
import { NETWORKS } from "../config";
import { ethers } from "ethers";

async function main() {
Expand Down
1 change: 0 additions & 1 deletion test/gateway/gateway.createorder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ describe("Gateway create order", function () {
});

it("Should revert when creating order with insufficient allowance", async function () {
const ret = await getSupportedInstitutions();
const fee = ethers.utils.formatBytes32String("fee");

await this.gateway
Expand Down
2 changes: 0 additions & 2 deletions test/utils/utils.manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const Errors = {
OrderFulfilled: "OrderFulfilled",
OrderRefunded: "OrderRefunded",
UnableToProcessRewards: "UnableToProcessRewards",
InvalidInstitutionCode: "InvalidInstitutionCode",
Allowance: "ERC20: insufficient allowance",
},
};
Expand All @@ -32,7 +31,6 @@ const Events = {
OrderSettled: "OrderSettled",
OrderRefunded: "OrderRefunded",
SettingManagerBool: "SettingManagerBool",
SupportedInstitutionsUpdated: "SupportedInstitutionsUpdated",
ProtocolFeeUpdated: "ProtocolFeeUpdated",
ProtocolAddressUpdated: "ProtocolAddressUpdated",
},
Expand Down

0 comments on commit 1948589

Please sign in to comment.