From b31dcc785c6189035cc10d5343070ebe2b3dc962 Mon Sep 17 00:00:00 2001 From: Bharath Vedartham Date: Thu, 7 Dec 2023 21:31:26 +0530 Subject: [PATCH] fix build errors --- stader-cli/node/deposit-sd.go | 2 +- stader-cli/node/repay-sd.go | 2 +- stader/api/node/commands.go | 2 +- stader/api/node/deposit-sd.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stader-cli/node/deposit-sd.go b/stader-cli/node/deposit-sd.go index cec781f3c..b361c2cf4 100644 --- a/stader-cli/node/deposit-sd.go +++ b/stader-cli/node/deposit-sd.go @@ -62,7 +62,7 @@ func DepositSdWithAmount(staderClient *stader.Client, amountWei *big.Int, autoCo if allowance.Allowance.Cmp(amountWei) < 0 { fmt.Println("Before depositing SD, you must first give the collateral contract approval to interact with your SD. Amount to approve: ", eth.WeiToEth(amountWei)) - err = nodeApproveSdWithAmount(staderClient, amountWei, contracts.SdCollateralContract, autoConfirm, nonce) + err = nodeApproveSdWithAmountAndAddress(staderClient, amountWei, contracts.SdCollateralContract, autoConfirm, nonce) if err != nil { return err } diff --git a/stader-cli/node/repay-sd.go b/stader-cli/node/repay-sd.go index 4bda6e49f..e7ec40775 100644 --- a/stader-cli/node/repay-sd.go +++ b/stader-cli/node/repay-sd.go @@ -54,7 +54,7 @@ func repaySD(c *cli.Context) error { if allowance.Allowance.Cmp(amountWei) < 0 { fmt.Println("Before repay SD, you must first give the utility contract approval to interact with your SD. Amount to approve: ", eth.WeiToEth(amountWei)) - err = nodeApproveSd(c, contracts.SdUtilityContract.String(), amountInString) + err = nodeApproveUtilitySd(c, amountInString) if err != nil { return err } diff --git a/stader/api/node/commands.go b/stader/api/node/commands.go index 0d7eddc95..bc8423ab9 100644 --- a/stader/api/node/commands.go +++ b/stader/api/node/commands.go @@ -303,7 +303,7 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { return err } // Run - api.PrintResponse(getDepositSdApprovalGas(c, amountWei, contractAddress)) + api.PrintResponse(getSdApprovalGas(c, amountWei, contractAddress)) return nil }, diff --git a/stader/api/node/deposit-sd.go b/stader/api/node/deposit-sd.go index d13474676..28fae82e7 100644 --- a/stader/api/node/deposit-sd.go +++ b/stader/api/node/deposit-sd.go @@ -69,7 +69,7 @@ func canNodeDepositSd(c *cli.Context, amountWei *big.Int) (*api.CanNodeDepositSd } -func getDepositSdApprovalGas(c *cli.Context, amountWei *big.Int, contractAddress common.Address) (*api.SdApproveGasResponse, error) { +func getSdApprovalGas(c *cli.Context, amountWei *big.Int, contractAddress common.Address) (*api.SdApproveGasResponse, error) { // Get services if err := services.RequireNodeWallet(c); err != nil { return nil, err