Skip to content

Commit

Permalink
fix: path resolution (#294)
Browse files Browse the repository at this point in the history
fix: path resolution (#294)
  • Loading branch information
cgilbe27 authored Jan 23, 2024
2 parents d5fbd43 + caad35d commit 6c76223
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#!/bin/bash
set -e

# TODO: This assumes nibiru is a relative path in the current working directory, but this doesn't work locally
cd nibiru
git checkout releases/v0.21.x
cd ..
yarn gql-generate
yarn proto-gen
yarn build:tsc
yarn docgen

echo "Fix path resolution"
dist_folder="./dist"
# Go through all ts and js files in the dist folder
find "$dist_folder" -type f \( -name "*.ts" -o -name "*.js" \) -exec sed -i 's|require("@/|require("src/|g' {} +


# yarn docgen
9 changes: 9 additions & 0 deletions src/sdk/msg/encode-types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { EncodeObject } from "@cosmjs/proto-signing"
import { PerpMsgFactory } from "./perp"
import { SpotMsgFactory } from "./spot"

export interface MsgTypeUrls {
[msg: string]: string
}

export declare class MsgFactory {
spot: typeof SpotMsgFactory
perp: typeof PerpMsgFactory
}

export declare const Msg: MsgFactory

/** TxMessage: a message contained within a transaction.
*
* @field typeUrl: registered identifier for the proto message
Expand Down

1 comment on commit 6c76223

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines Statements Branches Functions
Coverage: 96%
96.81% (6018/6216) 98.26% (679/691) 84.93% (186/219)

Please sign in to comment.