Skip to content

Commit

Permalink
feat: update getMarginTradingPosition to postMarginTradingPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Jan 14, 2025
1 parent fe90487 commit 5bcbb2c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/datasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class DataSource {
return this.callAPI(`/v1/search/?keyword=${receipt_id}`, "GET", null, null, config?.txIdApiUrl);
}

getMarginTradingPosition(params) {
postMarginTradingPosition(params) {
return this.callAPI(`/v3/margin-trading/position`, "POST", null, params, config?.indexUrl);
}

Expand Down
2 changes: 1 addition & 1 deletion screens/Trading/components/ClosePositionMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const ClosePositionMobile: React.FC<IClosePositionMobileProps> = ({
.filter((item) => item.hasStorageDepositClosePosition)
.map(async (item) => {
try {
await DataSource.shared.getMarginTradingPosition({
await DataSource.shared.postMarginTradingPosition({
addr: accountId,
process_type: "close",
tx_hash: item.txHash,
Expand Down
2 changes: 1 addition & 1 deletion screens/Trading/components/ConfirmMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ const ConfirmMobile: React.FC<IConfirmMobileProps | any> = ({
.filter((item) => item.hasStorageDeposit)
.map(async (item) => {
try {
await DataSource.shared.getMarginTradingPosition({
await DataSource.shared.postMarginTradingPosition({
addr: accountId,
process_type: "open",
tx_hash: item.txHash,
Expand Down
2 changes: 1 addition & 1 deletion screens/Trading/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const Trading = () => {
.filter((item) => item.hasStorageDeposit || item.hasStorageDepositClosePosition)
.forEach(async (item) => {
try {
await DataSource.shared.getMarginTradingPosition({
await DataSource.shared.postMarginTradingPosition({
addr: accountId,
process_type: item.hasStorageDepositClosePosition ? "close" : "open",
tx_hash: item.txHash,
Expand Down

0 comments on commit 5bcbb2c

Please sign in to comment.