Skip to content

Commit

Permalink
CI: enforce fmt simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
chappjc committed Jul 6, 2022
1 parent 1961b68 commit ef4120b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
8 changes: 4 additions & 4 deletions client/asset/btc/btc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ func testAvailableFund(t *testing.T, segwit bool, walletType string) {
blockHash, _ := node.addRawTx(blockHeight, msgTx)

node.getTransactionMap = map[string]*GetTransactionResult{
"any": &GetTransactionResult{
"any": {
BlockHash: blockHash.String(),
BlockIndex: blockHeight,
Details: []*WalletTxDetails{
Expand Down Expand Up @@ -2388,7 +2388,7 @@ func testSender(t *testing.T, senderType tSenderType, segwit bool, walletType st

node.sendToAddress = txHash.String()
node.getTransactionMap = map[string]*GetTransactionResult{
"any": &GetTransactionResult{
"any": {
BlockHash: blockHash.String(),
BlockIndex: blockHeight,
Hex: txB,
Expand Down Expand Up @@ -2553,7 +2553,7 @@ func testConfirmations(t *testing.T, segwit bool, walletType string) {
txB, _ := serializeMsgTx(tx)

node.getTransactionMap = map[string]*GetTransactionResult{
"any": &GetTransactionResult{
"any": {
BlockHash: blockHash.String(),
Hex: txB,
}}
Expand Down Expand Up @@ -3877,7 +3877,7 @@ func testGetTxFee(t *testing.T, segwit bool, walletType string) {
}

node.getTransactionMap = map[string]*GetTransactionResult{
"any": &GetTransactionResult{
"any": {
Hex: txBytes,
},
}
Expand Down
4 changes: 2 additions & 2 deletions client/asset/btc/spv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ func TestSwapConfirmations(t *testing.T) {
node.confsSpent = true
txB, _ := serializeMsgTx(swapTx)
node.getTransactionMap = map[string]*GetTransactionResult{
"any": &GetTransactionResult{
"any": {
BlockHash: swapBlockHash.String(),
BlockIndex: swapHeight,
Hex: txB,
Expand Down Expand Up @@ -593,7 +593,7 @@ func TestGetTxOut(t *testing.T) {

// Wallet transaction found
node.getTransactionErr = nil
node.getTransactionMap = map[string]*GetTransactionResult{"any": &GetTransactionResult{
node.getTransactionMap = map[string]*GetTransactionResult{"any": {
BlockHash: blockHash.String(),
Hex: txB,
}}
Expand Down
3 changes: 3 additions & 0 deletions dex/networks/erc20/contracts/updatecontract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,7 @@ if [ "$VERSION" -eq "0" ]; then

perl -0pi -e 's/\/\/ ERC20SwapSwap[^}]*}\n\n//' $CONTRACT_FILE
perl -0pi -e 's/ERC20SwapSwap/ethv0.ETHSwapSwap/g' $CONTRACT_FILE

# Reorder the imports since we rewrote go-ethereum/event to a dcrdex package.
gofmt -s -w "$CONTRACT_FILE"
fi
2 changes: 1 addition & 1 deletion dex/networks/erc20/contracts/v0/contract.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dex/networks/eth/txdata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ func TestParseInitiateDataV0(t *testing.T) {
locktime := int64(1632112916)

initiations := []*Initiation{
&Initiation{
{
LockTime: time.Unix(locktime, 0),
SecretHash: secretHashA,
Participant: participantAddr,
Value: 1,
},
&Initiation{
{
LockTime: time.Unix(locktime, 0),
SecretHash: secretHashB,
Participant: participantAddr,
Expand Down Expand Up @@ -164,11 +164,11 @@ func TestParseRedeemDataV0(t *testing.T) {
copy(secretB[:], mustParseHex("2c0a304c9321402dc11cbb5898b9f2af3029ce1c76ec6702c4cd5bb965fd3e73"))

redemptions := []*Redemption{
&Redemption{
{
Secret: secretA,
SecretHash: secretHashA,
},
&Redemption{
{
Secret: secretB,
SecretHash: secretHashB,
},
Expand Down

0 comments on commit ef4120b

Please sign in to comment.