@@ -66,7 +66,7 @@ func (h *MessageHasherV1) Hash(ctx context.Context, msg cciptypes.Message) (ccip
66
66
lggr .Debugw ("hashing message" , "msg" , msg )
67
67
68
68
rampTokenAmounts := make ([]any2AptosTokenTransfer , len (msg .TokenAmounts ))
69
- for _ , rta := range msg .TokenAmounts {
69
+ for i , rta := range msg .TokenAmounts {
70
70
destGasAmount , err := abiDecodeUint32 (rta .DestExecData )
71
71
if err != nil {
72
72
return [32 ]byte {}, fmt .Errorf ("decode dest gas amount: %w" , err )
@@ -83,13 +83,13 @@ func (h *MessageHasherV1) Hash(ctx context.Context, msg cciptypes.Message) (ccip
83
83
lggr .Debugw ("abi decoded dest token address" ,
84
84
"destTokenAddress" , destTokenAddress )
85
85
86
- rampTokenAmounts = append ( rampTokenAmounts , any2AptosTokenTransfer {
86
+ rampTokenAmounts [ i ] = any2AptosTokenTransfer {
87
87
SourcePoolAddress : rta .SourcePoolAddress ,
88
88
DestTokenAddress : destTokenAddress ,
89
89
DestGasAmount : destGasAmount ,
90
90
ExtraData : rta .ExtraData ,
91
91
Amount : rta .Amount .Int ,
92
- })
92
+ }
93
93
}
94
94
95
95
// one difference from EVM is that we don't left pad the OnRamp to 32 bytes here, we use the source chain's canonical bytes encoding directly.
0 commit comments