Skip to content

Commit

Permalink
chore(ramp): upgrade sdk to 1.25.4 (#7800)
Browse files Browse the repository at this point in the history
  • Loading branch information
wachunei authored Nov 15, 2023
1 parent 2d28d2f commit dcd0f64
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
1 change: 0 additions & 1 deletion app/components/UI/AddressInputs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ const createStyles = (colors, layout = 'horizontal') => {
accountNameLabelText: {
marginLeft: 4,
marginTop: 4,
horizontalAlign: 'center',
textAlign: 'center',
paddingHorizontal: 8,
...fontStyles.bold,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ describe('SendTransaction View', () => {
"to": "0x34256",
"value": "0x2bea80d2171600",
},
Object {
"deviceConfirmedOn": "metamask_mobile",
},
],
]
`);
Expand All @@ -413,6 +416,9 @@ describe('SendTransaction View', () => {
"to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"value": "0x0",
},
Object {
"deviceConfirmedOn": "metamask_mobile",
},
],
]
`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import { useDispatch, useSelector } from 'react-redux';
import { useNavigation } from '@react-navigation/native';
import { BN } from 'ethereumjs-util';
import { SellOrder } from '@consensys/on-ramp-sdk/dist/API';
import {
Transaction,
TransactionController,
} from '@metamask/transaction-controller';
import { Transaction, WalletDevice } from '@metamask/transaction-controller';
import Engine from '../../../../../../core/Engine';

import Row from '../../components/Row';
Expand Down Expand Up @@ -90,9 +87,7 @@ function SendTransaction() {
}, [colors, navigation]);

const handleSend = useCallback(async () => {
const {
TransactionController: TxController,
}: { TransactionController: TransactionController } = Engine.context;
const { TransactionController: TxController } = Engine.context;

let transactionParams: Transaction;
const amount = addHexPrefix(
Expand Down Expand Up @@ -123,7 +118,9 @@ function SendTransaction() {
}

try {
const response = await TxController.addTransaction(transactionParams);
const response = await TxController.addTransaction(transactionParams, {
deviceConfirmedOn: WalletDevice.MM_MOBILE,
});
const hash = await response.result;
if (order?.id) {
dispatch(setFiatSellTxHash(order.id, hash));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"axios": "1.6.0"
},
"dependencies": {
"@consensys/on-ramp-sdk": "1.25.3",
"@consensys/on-ramp-sdk": "1.25.4",
"@eth-optimism/contracts": "0.0.0-2021919175625",
"@ethereumjs/common": "^2.3.1",
"@ethereumjs/tx": "^3.2.1",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1280,10 +1280,10 @@
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0"
integrity sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==

"@consensys/[email protected].3":
version "1.25.3"
resolved "https://registry.yarnpkg.com/@consensys/on-ramp-sdk/-/on-ramp-sdk-1.25.3.tgz#520205c1c3b6844f0c6fbe50a68d04725dff2df8"
integrity sha512-nPcvoG2m75b/6xLdeUMn1egApzNKuI2jHcR+IBOw22VzMR+xdzbf5QrrkTKTNSCH+Pv8qu09E0LFrOXdXoVVlA==
"@consensys/[email protected].4":
version "1.25.4"
resolved "https://registry.yarnpkg.com/@consensys/on-ramp-sdk/-/on-ramp-sdk-1.25.4.tgz#d4e26252784771c00751eacd99c6eab1abc9d416"
integrity sha512-zQoC9dEIMB9QZ4oW2VdB1I+otYDpH+CpA5HZC6L7T9vTaOKyOH1FqK6e97PleVMA4dgk2h3gwZAVcNmdlOt2xg==
dependencies:
async "^3.2.3"
axios "^0.27.0"
Expand Down

0 comments on commit dcd0f64

Please sign in to comment.