Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: address issue based on feedback #803

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions contract/ifx_bridge_logic.sol.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contract/quote.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import (
)

func (i IBridgeFeeQuoteQuoteInfo) IsTimeout(blockTime time.Time) bool {
return new(big.Int).Sub(i.Expiry, big.NewInt(int64(blockTime.Second()))).Sign() <= 0
return new(big.Int).Sub(i.Expiry, big.NewInt(blockTime.Unix())).Sign() <= 0
}
2 changes: 1 addition & 1 deletion solidity/contracts/bridge/IFxBridgeLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ interface IFxBridgeLogic is IBridgeCall {
address indexed _refund,
address indexed _to,
address _txOrigin,
uint256 _value,
uint256 _eventNonce,
string _dstChain,
address[] _tokens,
uint256[] _amounts,
bytes _data,
uint256 _quoteId,
bytes _memo
);

Expand Down
2 changes: 1 addition & 1 deletion x/crosschain/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ func (m *MsgBridgeCallClaim) validate() (err error) {
return sdkerrors.ErrInvalidAddress.Wrapf("invalid refund address: %s", err)
}
if m.QuoteId.IsNil() || m.QuoteId.IsNegative() {
return sdkerrors.ErrInvalidRequest.Wrap("invalid value")
return sdkerrors.ErrInvalidRequest.Wrap("invalid quote ID")
}
if len(m.Data) > 0 {
if _, err = hex.DecodeString(m.Data); err != nil {
Expand Down
5 changes: 4 additions & 1 deletion x/erc20/keeper/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ func (k Keeper) GetCache(ctx context.Context, key string) (sdkmath.Int, error) {
func (k Keeper) ReSetCache(ctx context.Context, oldKey, newKey string) error {
amount, err := k.Cache.Get(ctx, oldKey)
if err == nil {
return k.Cache.Set(ctx, newKey, amount)
if err = k.Cache.Set(ctx, newKey, amount); err != nil {
return err
}
return k.Cache.Remove(ctx, oldKey)
}

if !errors.IsOf(err, collections.ErrNotFound) {
Expand Down
Loading